-2
这是我的代码:的Python 3.4.1 - 把变量放入输入
import random
x = random.randint(2,10)
y = random.randint(2,10)
answer = int(input("How much is x * y?"))
我有我的输入使用变量x, y
,因此用户会看到这个当它们运行的程序(该程序显然是没有完成,我只需要这个帮助):
How much is 3 * 5?
但我不知道如何把这些变量内的输入..请帮助!
应该使用.format而不是旧的%运算符 – 2014-10-18 15:59:43