oregon-trail | Oregon Trail remake in JavaScript - CMSC | Game Engine library
kandi X-RAY | oregon-trail Summary
kandi X-RAY | oregon-trail Summary
Oregon Trail remake in JavaScript - CMSC 433 Scripting Languages group project
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of oregon-trail
oregon-trail Key Features
oregon-trail Examples and Code Snippets
Community Discussions
Trending Discussions on oregon-trail
QUESTION
I am writing Oregon trail game and this is the code I have that is causing issues, I don't know why it is having issues. What I want to do is if they enter a name that contains a word that is in a list it will set the variable easter_mode to 1 if they don't then it will set easter_mode to 0. The words that need to be in the list are: (Sturtz, sturtz, Nate, nate) Thank you
...ANSWER
Answered 2020-Sep-24 at 17:25You'll get this error in Python 2. In Python 2, input()
uses the exact value as your enter it.
In your example, you're typing nate
and not 'nate'
. The former value is a variable name (which is undefined in your code, hence the NameError
), whereas the latter is a string.
In Python 3, input()
behaves as you assume, and passes a string to your code.
If you are sure that you want to use Python 2, you can replace input()
with raw_input()
and it will interpret your input as a string rather than a variable name.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oregon-trail
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page