Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Write a program that plays duck duck goose. Allow the user to enter the player's number they want to call goose on, and then say "duck" for each player before the "goose", then say "goose" for the chosen player.
- # Which player do you want to Goose? 5
- # Player 1: Duck
- # Player 2: Duck
- # Player 3: Duck
- # Player 4: Duck
- # Player 5: Goose
- puts "Let's Play Duck Duck Goose"
- puts "Which player do you want to Goose: "
- input = gets.chomp.to_i
- player = 1
- while input != player do
- puts "Player # #{player}: Duck"
- player = player + 1
- end
- puts "Player # #{player}: Goose"
Add Comment
Please, Sign In to add comment