python 用户交互
3.x input
username=input(“uername: “)
password=input(‘password : ‘)
2.x
raw_input==input(3.x)
input !=input(3.x)
控制和循环语句
if–else;if-elif-else;
while;
for:
guess.py
count=0
b=input(‘please input b: ‘)
if b==a:
print (‘you got it!’)
else:
print (“please try again”)
elif b
#
for i in range(10):
print i
for j in range(10):
print j
if i >5:
break
count = 0
while (count < 9):
print ‘The count is:’, count
count = count + 1
print “Good bye!”