Skip to content

Commit

Permalink
Learning chapter 1
Browse files Browse the repository at this point in the history
  • Loading branch information
chenguohui committed Jun 27, 2017
1 parent 5afedd6 commit 6c83612
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions chap01/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This program says hello and asks for my name.

print('Hello world!')
print('What is your name?') # ask for their name
myName = input()
print('It is good to meet you, ' + myName)
print('The length of your name is:')
print(len(myName))
print('What is your age?') # ask for their age
myAge = input()
print('You will be ' + str(int(myAge) + 1) + ' in a year.')

0 comments on commit 6c83612

Please sign in to comment.