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 RĂ©ponses
+ 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!