标签:dea wro guess can input ESS inpu ack world
‘‘‘print("hello world!")
print("123")
x=3
y=5
print("x乘以y=", x*y)
name = "alex li"
name2 = name
print(name,name2)
name = "jack"
print("what is the value of name2 now?")
print(u"我爱北京天安门")
death_age = 80
name = input("your name:")
age = input("your age:")
print("you can still live for ",death_age-int(age),"years")‘‘‘
‘‘‘age_xiaowei = 24
input("age = ")
if(int(age) < age_xiaowei:
print("No,you are wrong,just guess bigger")
else if (int(age) > age_xiaowei:
print("No,you are wrong,just guess smaller")
else if (int(age) == age_xiaowei:
print("you are right"))))‘‘‘
age_xiaowei = 24
guess_age=int(input("guess_age:"))
if guess_age == age_xiaowei: #if后面接条件,必须注意的是,条件后必须带冒号
print("you are right")
else: #与if一样,else后面接条件,条件后必须带冒号
print("you are wrong") #在python中,用相同的缩进代表同一级别的代码
‘‘‘age_xiaowei = 24
guess_age = int(input("age = "))
if guess_age < age_xiaowei:
print("No,you are wrong,just guess bigger")
elif guess_age > age_xiaowei: #在python中,elseif必须写成elif
print("No,you are wrong,just guess smaller")
else:
print("you are right")‘‘‘
标签:dea wro guess can input ESS inpu ack world
原文地址:https://www.cnblogs.com/zxw2016208120/p/11357085.html