Your task is to create a simple game
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Your task is to create a simple game

Question 7:

Your task is to create a simple game. In order to implement the game, you must use the function structure in your program. In this game, the user must virtually roll two dices. After rolling the first dice, the program should display the dice number and prompt the user to guess the sum of the two dices. After the user enters his/her guess, the program should roll the second dice and display "You won the game" if the sum of the two dice was equal to the user's guess, otherwise display "You lost the game." The program should continue till the time that user wants to keep playing.

Hint
ComputerSimply said, a function is a "chunk" of code that you may reuse repeatedly rather than having to write it out several times. Programmers can divide an issue into smaller, more manageable parts, each of which can carry out a specific task, using functions....

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.