标签:got name bsp style ges int() python 年龄 一课
python第一次接触时感觉简洁明了,没有c语言烦多,第一课学了打印有关交互的知识。
‘‘‘username = input("userane:")
password = input("password:")
print(username,password)‘‘‘
name = input("name:")
age = input("age:")
job = input("job:")
salary = input("salary:")
info = ‘‘‘
------- info of %s ------
name:%s
age:%s
job:%s
salary:%s
‘‘‘ % (name,name,age,job,salary)
print(info)
第二课讲了一个猜年龄的
age_of_wo = 23
gessar_age = int(input("gessar age:"))
if gessar_age == age_of_wo :
print("yes,you got it.")
elif gessar_age > age_of_wo:
print("think bigger!")
else:
print("think small...")
print()
标签:got name bsp style ges int() python 年龄 一课
原文地址:https://www.cnblogs.com/7882-com/p/8747240.html