输入:
password = input("清输入密码: ")
print("你刚输入的密码是:", password)
输出变量的类型:
a = 10
a = "abc"
print(type(a))
强制转换int
a = int("123")
print(type(a))
b = a+100
print(b)
c = int(input("输入:"))
print("输入一个数字:%d"%c)
输入一个变量查看变量类型
a = input("输如:")
print(type(a))
print("输出",a)
输入一个数字强制转化为数字输出:
c = int (input("输入c;") )
print(type(c))
print("输入一个数字:%d" %c )
算数运算符 + , - , * , / , %(余)
比较运算符 == , != ,
赋值运算符 = , == , -= , *= , /=
逻辑运算符 and (与) , or(或) ,not(非)
成员运算符: in 指定序列中找到要找的值 返回 trun 没有找到 返回false 。 not in 指定序列没有要找的数 返回trun 有要找的数false
if 语句:
if 0:
print("True")
e