Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs1-24fa
lecture-code
Commits
07535bb5
Commit
07535bb5
authored
4 months ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Add new file
parent
53c0fea3
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
16/AnimalGame.java
+37
-0
16/AnimalGame.java
with
37 additions
and
0 deletions
+37
-0
16/AnimalGame.java
0 → 100644
View file @
07535bb5
import
static
java
.
io
.
IO
.*;
import
java.util.Random
;
// def play_animal_game():
void
play_animal_game
()
{
// choices = ['cow', 'dog', 'horse', 'cat', 'bird']
// choice = choices[random.randInt(0, len(choices))]
// animal = input("Which animal am I thinking of between " + ", ".join(choices) + "? ")
// if animal == choice:
// print("Yes! It was " + choice + "!")
// else:
// print("No! It was " + choice + "!");
}
/*
def play_until_exit():
again = True
while again:
play_animal_game()
again = input("Would you like to play again (y/n)? ")
if again.lower().startswith("n"):
print("Goodbye!")
again = False
*/
void
play_until_exit
()
{
}
double
play_5_times
()
{
return
0.0
;
}
void
main
()
{
play_until_exit
();
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help