Skip to content

Commit 6c83612

Browse files
committed
Learning chapter 1
1 parent 5afedd6 commit 6c83612

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

chap01/hello.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This program says hello and asks for my name.
2+
3+
print('Hello world!')
4+
print('What is your name?') # ask for their name
5+
myName = input()
6+
print('It is good to meet you, ' + myName)
7+
print('The length of your name is:')
8+
print(len(myName))
9+
print('What is your age?') # ask for their age
10+
myAge = input()
11+
print('You will be ' + str(int(myAge) + 1) + ' in a year.')

0 commit comments

Comments
 (0)