如何让用户输入他们想要的任何类型的数字?这是我尝试过的:
a=0
def main():
x = int(input("Input a number in Celsius to convert it to Fahrenheit"))
f = (x*1.8)+(32)
print(f, "degrees Fahrenheit")
a=a+1
while a > 0:
main()
main()
Run Code Online (Sandbox Code Playgroud) python ×1