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

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -