How is it working now? I think your issue is the fact that it is looking for you to input an integer but you are entering a string therefore the error
To fix this:
remove the int() on your inp input
Also: if q is set to an integer earlier you need to specify this later
if inp == str("q")
I guess it's been answered, but you're basically telling the user to type a number, and then asking the computer to see if that number equals the letter 'q'. Based on your w and e inputs, I'm guessing q is a variable, so remove the quotes.
Right now if I enter 2, you're checking:
"Does 2 equal q?"
Without the quotes, it becomes:
"Does 2 equal the value of q?"
Very different statements!
@HarveyH well then you need to remove the int from your input. Should just be inp = input('Type a letter?').
The error is because"q" can't be converted to a number. The int() function concerts a string to an integer, ie: "1" into 1. Make that Quick change and you won't see that error any more.
By the way, if you just want a program that prints the character you type in, you don't need such an extended if-elif statement. Just type
print(input("Type a letter."))
Alternatively, if you want to make sure it's only one letter, type
print(input("Type a letter.")[1:])
print("You didn't type anything")
when you use "input" in python the interface returns a string variable. applying int to a string doesn't make any sense. If you want a user input a number that you want to calculate with you would have to do something like this...
inp = eval(input("Enter a number: ")) ... or if you want it to be an integer... you could do this
inp=int(eval(input("Enter a number:")))