Re: python code

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Sesso
日付:  
To: Main PLUG discussion list
題目: Re: python code
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 <> 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 - 
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss