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
At the frequency of 2.4 GHz what is the free-space path loss in dB.
chubhunter [2.5K]

Answer:

The FSBL is 100.05 dB

Solution:

As per the question:

Frequency, f = 2.4 GHz = 2.4\times 10^{9}

Now, we know that to calculate FSBL, i.e., Free Space Path Loss in dB, we use:

FSBL(in dB) = 10log_{10}(\frac{4\pifd}{c})^{2}

where

d = 1 km = 1000

c = 3\times 10^{8} m/s

FSBL(in dB) = 20log_{10}\frac{4\pifd}{c} = 20log_{10}(fd) + 20log_{10}(\frac{4\pi}{c})

FSBL(in dB) = 20log_{10}(f) + 20log_{10}(d) + 20log_{10}(\frac{4\pi}{c})

FSBL(in dB) = 20log_{10}(2.4\times 10^{9}) + 20log_{10}(10^{3}) + 20log_{10}(\frac{4\pi}{3\times 10^{8}})

FSBL(in dB) = 20\times 9.3802 + 20\times 3 - 147.55 = 100.05 dB

6 0
2 years ago
Which does the histogram resemble the most?
ch4aika [34]

The best and most correct answer among the choices provided by your question is the third choice or letter C. A bar graph resembles histogram the most.

A histogram<span> is a graphical representation of the distribution of numerical data. It is an estimate of the probability distribution of a continuous variable (quantitative variable) and was first introduced by Karl Pearson.
</span>
I hope my answer has come to your help. Thank you for posting your question here in Brainly.


3 0
2 years ago
You have four DCs in your domain. Active Directory appears to be corrupted on one of the DCs, and you suspect a failing hard dri
Softa [21]

Answer:C

Explanation:

5 0
3 years ago
Wired network are the most reliable and provide the highest speed?
lbvjy [14]

A wired connection is almost always reliable and fastest, so that one gets a True.

When it comes to wireless networks, it really just depends on how you're setting them up.  A normal wireless set up is generally effortless to set up because a lot of router manufacturers include wizards in the router's firmware to help you get started, so that gets a False.

8 0
2 years ago
HELP PLS QUICK TRUE OR FALSE QUESTION
dmitriy555 [2]

Answer: I think the answer is true but I don't fully understand it sorry if im wrong.

Explanation:

8 0
2 years ago
Read 2 more answers
Other questions:
  • Please look at picture
    10·2 answers
  • Who is typically considered to be the father of computing
    6·1 answer
  • What is trouble shoot​
    11·1 answer
  • Do you think I could create a working animatronic like the one from five nights at freddys
    12·2 answers
  • Amazon.com uses a customer profiling system whenever a customer visits its website. using this system, amazon can offer products
    6·1 answer
  • Match each of the following terms to its definition: I. web-based II. open source III. project management IV. personal informati
    12·1 answer
  • A. Get a value for x from the user.
    13·1 answer
  • The bullet points above describe _____.
    7·1 answer
  • If you do a Find and Replace for a term, where will Word begin looking for the term?
    6·1 answer
  • Beginning in cell B21, complete the series of substitution values ranging from $35 to $45 in increments of $2.50 vertically down
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!