0
s=input("enter a no.")>>>s*'4'
why doesn't👆run?
2 Answers
0
If you run it on a Python software it should tell you what the problem is or at least where it is located.
0
The input function returns a string, and you are trying to multiple 2 strings together. If you are trying to multiply the number entered by 4 you will first need to convert it.
in one line you could do:
s=int(input ("Enter a no."))
print(s*4)
note that if you enter a string that is not a number your program will crash.
or alternatively to see what is happening:
s=input("Enter a no.")
x = int(s)
print(x * 4)



