Skip to content

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