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
Ben would like to let everyone in the class know about the topic his group is researching.
Rasek [7]
I think the best way is to email
6 0
3 years ago
When you hear the word “stress” what does it mean to you? How does stress affect you and what do you do to cope with stress
stepan [7]

   Ways to Cope with  Stress

  • Re-balance Work and Home.
  • Build in Regular Exercise.
  • Eat Well and drink lots of water.
  • Connect with Supportive People.
  • Carve out Hobby Time.
  • Practice Meditation, Stress Reduction or Yoga.
  • Sleep Enough.
  • Bond with Your Pet.

 

hope it helps! :)

3 0
2 years ago
Your company shares a building with a competitor’s branch office. Recently, you noticed that some computers other than company c
ki77a [65]

Answer:

Disable SSID Brodcasting, Lower Radio Power Levels, Enable MAC Filtering

3 0
2 years ago
Write an algorithm to create a customer’s bill for a company. The company sells only five different products. TV, VCR, Remote Co
alukav5142 [94]

Answer:

so

tv= 400$

VCR= $220

remote controller= $35

CD Player= $280

Tap recorder= $90

so total = $1025 total

here 8% sale tax increase so is 82$ so

1025-82$ = 943 total amount

increase or decrease tax according to your question :)

6 0
3 years ago
You must obey any special signs or instructions as you pass a construction zone.
valkas [14]
That is easy it is a
5 0
3 years ago
Read 2 more answers
Other questions:
  • What can web designers use to control the individual web page layouts for all of the pages on a website?
    7·1 answer
  • A(n ____ is a named group of formatting characteristics.
    7·1 answer
  • Most presentations use text: A. To maximize area and style. B. At a minimum. C. To draw attention to content. D. Without restrai
    9·2 answers
  • To create a new folder, press ____.
    12·1 answer
  • Suppose there are two links between a source and a destination. The first link has transmission rate 100 Mbps and the second lin
    12·1 answer
  • As part of a team, you are assigned to create a financial report. One of your tasks is to put the pieces together as other team
    5·1 answer
  • If you are running a server , which of the follow operating system would be best suited ?window 10 or macOS
    8·1 answer
  • 6. A rental car agency classifies the vehicles it rents into four categories: compact, midsize, full-size, and sport utility. Th
    11·1 answer
  • The most widely used computer device​
    6·2 answers
  • How do the following technologies help you with your quest to become a digital citizen kiosks enterprise computing, natural lang
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!