Ask coding questions

← Back to all posts
Help
klausef (1)
  1. Dice Guessing Game 30pts
    a. Generate a number between 1-6.
    b. Take an input
    c. If the generated number is higher than the input. Output “Higher”
    d. If the generated number is higher than the input. Output “Lower”
    e. If the generated number is the same of the input. Output “You win!”
    i. Ask the user if he/she would like to play again
    ii. If yes, start the game again
    iii. If no Exit the program
    f. If the user has no retries. Output “GAME OVER”
    i. Ask the user if he/she would like to play again
    ii. If yes, start the game again
    iii. If no Exit the Program
Comments
hotnewtop
JanDellDell (0)

can you make c++ instead of python?

RYANTADIPARTHI (5999)

everything seems to be working. What do you need help with?

klausef (1)

@RYANTADIPARTHI i want to add a number of retries and an option of play again.

RYANTADIPARTHI (5999)

@klausef here's how.

us = input('play again? ')
if us == "yes":
  # code for playing again
else:
  # code for exiting.

like that.

CoderBean (11)

What do you need help with?