0

I am not entirely sure why this is not working the way I intend it to. So I have a variable in this little path game I am coding; and q2 is what I am trying to call:

value = 420
while value > 1:
    q2 = float(input(":"))
    if q2 == 0:
        print("You cannot divide by 0!")
        continue
    value /= q2
    print(value)
    if int(value) == 8:
        print("Correct Answer")
        break

And Later on in the program I am trying to call the answer that was provided; to be used here:

print("You must Enter the correct code from the previous answer in the test for a call from your AGENT boss. . .")

while True:
    call = input("*Voice says 'PLEASE ENTER STAR PLUS THE TWO DIGIT CODE FOR ASSISTANCE'*")
    if call == int(q2):
        print("**THE PHONE BEGINS THE RING**")
        break
    elif call != q2:
         print("This will now self destruct")

Hopefully I am making sense in with what I am trying to achieve; When I run this in IDLE it gives me the same line again call = input("*Voice says 'PLEASE ENTER STAR PLUS THE TWO DIGIT CODE FOR ASSISTANCE'*") even after I have entered the value of 'q2'

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
biggums
  • 13
  • 2

0 Answers0