Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brittany Planet Express in Python and Java #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

brittanykohler
Copy link

Planet Express exercise completed in both Python and Java.

@@ -0,0 +1,73 @@
class PlanetExpress:
def __init__(self):
self.thirst = 50

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might recommend using some constants for these 50 and the 4 values

@kariabancroft
Copy link

For Java, most of the time you don't want to check in the .class file, only the .java files

Scanner reader = new Scanner(System.in); // Reading from System.in
System.out.println("Type drink, deliver, steal, eat, or account to continue playing.");
String input = reader.next();
while (!input.toLowerCase().equals("drink") && !input.toLowerCase().equals("deliver") && !input.toLowerCase().equals("steal")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like you should be doing the lower case operation only once rather than in each of these equivalence checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants