Python: User enters number, then a letter, then outputs the letter the amount of times as the number says:
for example
"Enter Integer": 4
"Enter Letter": a
OUTPUT
a
a
a
a
This is what I currently have, but I get name error, ' ' is not defined, ' ' being the letter
integer = int(input("Enter a positive integer: "))
character = str(input("Enter a character, e.g. 'a': "))
for i in range(integer):
print str(character)
If I typed 4, 4 it would give me
4
4
4
4
That works, but letters will not output, I'm new to python so you'll have to excuse me
Any ideas?
Link of Error: https://i.stack.imgur.com/dYtv8.jpg