0
Section 15.2 results in undefined variable
Hey! I’m trying to use inputs to create the phrase “hihihi.” But I keep getting an “undefined variable response for x. I cannot for my life figure out what’s wrong. Any chance any of you might be willing to help an utter newb? Here’s my code: x=input("hi") y=int(input(3)) print(x*y) Thanks!
4 Antworten
+ 3
Josh05
No as there is input so you should use input function but without passing any argument.
x = input()
y = int(input()
print (x * y)
+ 2
joshua Meyers
Don't write anything inside input() function
+ 1
Thanks! So, should the code just read:
X=“hi”
Y=int(3)
Print(x*y)
Thanks!
0
I’m an idiot. Thanks so much—i really appreciate it!