My oldest daughter is attempting to teach me Python.

in life •  8 years ago  (edited)


Image Credit:
http://steem.link/ocZ1F

My oldest daughter is home after a few days in her new Python class. She goes to UNCW in Wilmington North Carolina and has a long weekend. #shelovesthebeach

She is super excited about her new programming class and wanted to teach me. I attempted to explain to her I am not a programmer. I just started learning Markdown myself.

She made me get my laptop and sit down next to her. She then had me download Python 3.6 which has something called Idle and then follow along with her. I said, why not, I will give it a try.

She had me start with the Print function which was really easy. Then she took me to Int, input, mod, and if & else commands. I felt like she was going a little to fast at that point, for me anyway, and I said "we need to slow it down a bit." She just laughed at me. I said "now explain why this works." And she continued to laugh at me......

Learn Print

The first problem was to make a program to show your name, title, and office door number.


print ("Python Beginner")
print ("noob")
print ("101")


Learn Int and Input:

The second problem was to make a program to ask someone to enter their age and then tell them what year they would become 100 years old.

age = int(input("how old are you?"))
year = 2016
print ("You will turn 100 years old in",(100-age)+year)


Learn Mod and If & Else:

The third problem was to ask someone to put in any number and tell them if their number was odd or even.

number=int(input("Enter a number:"))
mod =number%2
if mod>0:
print ("You picked an odd number.")

else: print ("You picked an even number.")



Image credit:
http://steem.link/dgsiU

Summary:

She said on her long college breaks she will come home and teach me some more Python. I can't wait for the next lesson....

#life #python #prouddaddy

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!