标签:print 赋值 input 等于 ges 定义 直接 运算符 次方
算数运算符:+-*/ //()整除 %取余 **次方
比较运算符:>< >= <= !=不等于 ==等于 #单个等于表示赋值
找出三个数中的最大值:
a=input("number1:")
b=input("number2:")
c=input("number3:")
if int(a)>int(b):
if int(a)>int(c):
print("a is the biggest")
else:
print("c is the biggest")
else:
int(b)>int(a)
if int(b)>int(c):
print("b is the biggest")
else:
print("c is the biggest!")
#里面有太多int转换,直接把它在定义的时候就转换如下:
a=int(input("number1:"))
b=int(input("number2:"))
c=int(input("number3:"))
if a>b:
if a>c:
print("a is the biggest")
else:
print("c is the biggest")
else:
b>a
if b>c:
print("b is the biggest")
else:
print("c is the biggest!")
标签:print 赋值 input 等于 ges 定义 直接 运算符 次方
原文地址:http://www.cnblogs.com/minkillmax/p/7822364.html