Skip to content

Commit 890d020

Browse files
committed
增加判断语句的测试
1 parent 0480f6f commit 890d020

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test_if.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
age = raw_input('please input age')
4+
5+
if age > 18:
6+
print 'this is a adult man'
7+
print 'can do somethings'
8+
else:
9+
print 'this is a child'
10+
print 'can not do the works'

0 commit comments

Comments
 (0)