Skip to content

Commit

Permalink
judge number
Browse files Browse the repository at this point in the history
  • Loading branch information
Chee Wei authored and Chee Wei committed Jul 5, 2018
1 parent bd8e77c commit dcc96e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3"
}
6 changes: 4 additions & 2 deletions 1code/nameage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python
# coding=utf-8
# coding:utf-8
'''
filename: nameage.py
'''

name = input("What is your name?")
age = input("How old are you?")
Expand Down
17 changes: 17 additions & 0 deletions python3code/chapter02/judgenumber.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#coding:utf-8
'''
filename: judgenumber.py
'''

print("请输入任意一个整数数字:")
number = int(input())

if number == 10:
print("您输入的数字是:{}".format(number))
print("You are SMART.")
elif number > 10:
print("您输入的数字是:{}".format(number))
print("This number is more than 10.")
else:
print("您输入的数字是:{}".format(number))
print("This number is less than 10.")

0 comments on commit dcc96e3

Please sign in to comment.