I have been learning python 3.5, and trying to get a string to reprint a user input variable? -
print ("how old you??"), age = input() print("how tall you"), height = input() print("how weigh"), weight = input() print("so, you're '%r' old, '%r' tall , weigh '%r' ") % ('age, height weight')
typeerror: unsupported operand type(s) %: 'nonetype' , 'str
don't put variables in quotes. instead of
print("so, you're '%r' old, '%r' tall , weigh '%r' ") % ('age, height weight')
put
print("so, you're '%r' old, '%r' tall , weigh '%r' " % (age, height weight))
Comments
Post a Comment