14. python input

通过读取用户在控制台写入的字符进行操作

ainput = int(input('please set a number:'))

if ainput == 1:
    print('one')
elif ainput == 2:
    print('two')
else:
    print('number wrong')

  

posted @ 2017-03-18 00:37  涵叔  阅读(99)  评论(0)    收藏  举报