1.输入
password = input("请输入\n")
print("密码是%s" %password)
2.多个变量赋值
num, float, str = 20, 0.5, 'zhangsan'
print(num)
print(float)
print(str)
3.if else
age = int(input("请输入\n"))
if age >18:
print("1")
else:
print("2")
4.if elif
age2 = int(input("请输入\n"))
if age2 >18:
print("1")
elif age2<18:
print("2")
5.if嵌套
age = int(input("请输入\n"));
if age > 18:
print("1")
if age > 20:
print("2")
else:
print("3")
else:
print("4")