2018.09.13python学习第三天part3

输入输出

输入:input               注意:在Python3中,用户输入的任何类型的值都会被储存成str,这样可以时用户在输入时更加方便

输出:print

name=input(“请输入你的用户名 ”)  #用户名为:tony

pwd=input(“请输入你的密码”)         #密码为:123

if name == "tony" and pwd == "123":

print(“登陆成功”)

else

print(“登陆失败”)

这就是一个简单的输入输出程序

猜你喜欢

转载自www.cnblogs.com/hello-yuanjing/p/9641731.html