Python——输入与输出,Python的起步!

输入与输出

name = input(“请输入您的名字:”)

password = int(input(“请输入您的密码:”))

print(f”您的名字是{name},您的密码是{password},您的名字长度是{len(name)}”)

print(f”变量类型是{type(name)}”)

# print(type(int(age)))


print(1,2,3,4,sep=”&&&&”,end=”**”)

a = “xixi”

b = “haha”

print(a,sep=”~~”,end=”%%”)

print(b)

#file 可以指定输出方式

f = open(“test,txt”,”w+”)

print(“hello world!”,file=f)


username = input(“请输入您的名字:”)

password = input(“请输入您的密码:”)

print(username,password)

 

num = input(“请输入您想要的数字:”)

print(int(num)/10)

 

0

评论0

请先
显示验证码
没有账号?注册  忘记密码?