Console opens then immediately closes, but code checkst out (Python, Sublime) -


hi i'm relatively new coding , don't know why code isn't working

gender = input("what gender(m/f)?") if gender.upper() == m:     throw = paper elif gender.upper() == f:     throw = rock else:     print("issue") print throw 

which editor/runtime using? should able configure keeping console open when program exits can see errors.

in specific case looks you're using python 3, , need surround print argument parentheses here too:

print(throw) 

as using quotes around "m" , "f" signify they're strings.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -