Python问题
print "How old are you?",
age = raw_input()
print "How tall are you?",
height = raw_input()
print "How much do you weigh?",
weight = raw_input()
print "So, you're %r old, %r tall and %r heavy." % (
age, height, weight)
运行结果
求解
用的是python 2 还是 python 3 , python 2 的话语法是没错的 ,, python 3 需要这样改
print ("How old are you?")
age = input()
print ("How tall are you?")
height = input()
print ("How much do you weigh?")
weight = input()
print ("So, you're %r old, %r tall and %r heavy." % (age, height, weight)) xie仗剑天涯 发表于 2018-12-29 14:46
用的是python 2 还是 python 3 , python 2 的话语法是没错的 ,, python 3 需要这样改
print ("How old ar ...
多谢解惑
页:
[1]