python - IDLE is returning the '=== RESTART ===' line but no other output -


import random gcount = 1 pchoice = ("sdq") while gcount == 10 or pchoice == ("q"): pchoice = input("steal, deal or quit [s|d|q]?") if pchoice != ("q"):     gcount += 1     print("jackpot:100")  #determing , displaying choice     if pchoice == ("s"):         print("c: steal")     elif pchoice == ("d"):         print ("c: deal")  #determing , displaying computer choice     cchoice= random.randint(1,2)     if cchoice == 1:         print("comp:steal")     elif cchoice == 2:         print("comp:deal")  #determining , displaying whether player wins or loses, scores # round.     if pchoice == ("s") , cchoice == 1:         print("s:   0       |       0")         print("you lose! nothing!")     elif pchoice == ("d") , cchoice == 1:         print("s:   0       |       100")         print("you lose! nothing!")     elif pchoice == ("d") , cchoice == 2:         print("s:   50      |       50")         print("draw! split pot!")     else:         print("s:   100     |       0")         print("you win! jackpot!") 

this code returning

================================ restart ================================ 

when run in idle terminal. i'm unsure causing this.

python 3.4.3 32-bit idle 3.4.3 windows 7 64-bit 

assuming indentation of code (otherwise syntax error):

import random gcount = 1 pchoice = ("sdq") while gcount == 10 or pchoice == ("q"):     # else here 

then script nothing. gcount 1, gcount == 10 never true, such nothing in loop runs, , there no output otherwise.

so restart line says idle interpreter reset itself, ran script (resulting in no output), , it’s over.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -