1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Wewaii [24]
3 years ago
15

Write a program which simulate rolling dice. When the program runs, it will prompt the user to choose a number ranging from 1 to

6. It will then randomly choose a number between 1 and 6. The program will print the message "Your guess is correct!" if the guess number equals to the dice number, otherwise it will print "Wow! The dice number is --.". It should then ask the user if you’d like to roll again. Enter "1" to roll again and enter "0" to end the game. Concepts to keep in mind:
Concepts to keep in mind:
• Random
• Integer
• Print
• While Loops

Output:
Enter your guess number between 1 and 6: 5
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01
Enter your guess number between 1 and 6: 4
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01

Computers and Technology
1 answer:
Arada [10]3 years ago
5 0

Answer:

Written in Python

import random

tryagain = 1

while tryagain == 1:

guess = int(input("Enter your guess number between 1 and 6: "))

num = random.randint(1,7)

if guess == num:

print("Your guess is correct")

else:

print("Wow, the dice number is "+str(num))

tryagain = int(input("Do you want to dice it up again:Enter 1 and if not enter 0: "))

Explanation:

I've added the full source code as an image attachment where I used comments to explain difficult lines

You might be interested in
It needs to be as simple as possible. Each question is slightly different.1. An arithmetic progression is a sequence of numbers
madam [21]

Answer

can we get a picture of the problem ?

Explanation:

4 0
3 years ago
Your boss wants you to configure his laptop so that he can access the company network when he is on the road. You suggest a VPN
Rashid [163]

Answer:

All traffic that flows between the laptop and VPN server is encrypted.

Explanation:

A Virtual Private Network (VPN) is a "tunnel" connection between computers that performs just like a regular point-to-point network connection (that is, IP address to IP address).  It has the added feature that encryption is enabled so that no intermediate server (or computer or line monitor, etc.) can decode the information that is in the data portion of the packets.

5 0
3 years ago
Do you agree to the song that ''magtanim ay di biro?'' why?
iren [92.7K]

Answer:

I agree in this song because being a farmer is not easy you need to be hardwork

5 0
2 years ago
So this is not exactly a question but I can’t find the answer anywhere else. Also if you answer this, please do, I will give you
elena55 [62]

Answer: Well, in transit means "in the process of being transported" according to Merriam Webster, so I would think that would mean that it is being shipped from China over to America (Or wherever you may live) currently. Hope this helped!

Explanation:

6 0
3 years ago
An animal shelter recently held an adoption event and found homes for 48 of their shelter animals. If they found home for 80% of
vredina [299]

Answer:

9.6

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • You can use predesigned, formatted files called _____ to create new worksheets quickly.
    13·1 answer
  • Which is a feature of a strong thesis statement? A) It presents only the facts. B) It is open-ended. C) It answers the central q
    15·1 answer
  • A public Wi-Fi risk that can be minimized by only visiting
    5·1 answer
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • A group of developers for a startup company store their source code and binary files on a shared open-source repository platform
    14·1 answer
  • The system where the unit of measurement is centimeter
    15·1 answer
  • 2. Which pattern microphone should Jennifer take to the press conference? Jennifer is a journalist with one of the leading newsp
    14·1 answer
  • Differenciate between foreign key and primary key in database.
    8·1 answer
  • If a person communicates indirectly and attaches little value to
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!