python code

Sesso sesso at djsesso.com
Mon Apr 13 11:07:40 MST 2015


Your variable isn't in the while loop so it doesn't know that it changed. 

Sent from my iPhone

> On Apr 13, 2015, at 11:01 AM, Michael Havens <bmike1 at gmail.com> wrote:
> 
> well, I'm just starting to learn to code in python. Why am I getting an infinite loop?
> 
> print("Welcome.")
> g = input("Guess the number: ")
> guess = int(g)
> while guess != 5:
>     print("Guess again.")
> print("Correct")
> :-)~MIKE~(-:
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss


More information about the PLUG-discuss mailing list