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]
4 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]4 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
Which of the following describes a potentially damaging computer program that affects, or infects, a computer negatively by alte
prisoha [69]

Answer:

Option(b) i.e "utility virus" is the correct answer to the given question

Explanation:

The utility virus sometimes affected the operating system .It created the new files in the computer that makes the computer system slow .The utility virus making the spreading of malware in the computer system

The main objective of utility virus damaging the software program that impacts a pc or infects also it negatively by changing the way the machine operates without the user knowledge or the permission.

  • File conversion is used for converting the file extension it does not impact on computer damaging that's why this option is incorrect .
  • Hotspot is used to giving the access of internet it does not impact on computer damaging that's why this option is incorrect .
  • File compression utility  and  ZIP is used to reducing the file size it does not impact on computer damaging that's why this option is incorrect.

Therefore utility virus is the correct answer .

3 0
3 years ago
Read 2 more answers
A technician has been told that a keyboard is not responding at all. What can the technician do quickly to determine whether tha
givi [52]

Answer:

Press Caps Lock key to see the light illuminates or not

Explanation:

Computer keyboard is the typewriter-style device that uses arrangement of the buttons or the keys to act as the mechanical levers or the electronic switches.

Keyboard keys  have characters which are engraved or printed on the surface and press of each key corresponds to the single written symbol.

If the keyboard is not working and to see whether it is working or not, there is a Caps Lock key on the keyboard. Generally, all keyboards have a Caps Lock light which will light up if the button is on. So, this can be a quick check.

6 0
4 years ago
Which of the following refers to semitransparent text or a faint object that appears
Agata [3.3K]
<h2>Option D: Watermark refers to semitransparent text or a faint object that appears behind the document content.</h2>

Explanation:

Footer: This is a text which appears in the bottom of every page. Mostly page numbers and the name of the publisher or the company name will be in the footer.

Page Color: This represents the color of the page

Page border: This option provides border to the page. The border can be thin or thick according to the requirement.

Watermark: This is the right answer. A watermark is added such that your content cannot be used by anyone else without permission. When you copy the text, the water mark also gets copied, thus avoiding plagiarism.

4 0
3 years ago
What does the word complacency mean ?
bulgar [2K]

Answer:

a feeling of smug or uncritical satisfaction with oneself or one's achievements.

Explanation:

8 0
4 years ago
Read 2 more answers
PLEASE ANSWER CORRECTLY
Bess [88]

Answer:

If you know how many passes you'll be making, a for loop is most suitable.

If you do not know ahead of time, the while loop is better, since the while condition will decide if you're going to make another round.

5 0
3 years ago
Other questions:
  • Q3** Write a query to create a new price list for books written by the same author. Allow the user to enter only the first 4 let
    15·1 answer
  • Write a c++ function, largestnum, that takes as parameters a double array and its size and returns the index of the last occurre
    14·1 answer
  • What term is used to describe an individual's money and personal property? budget income assets finances
    12·2 answers
  • Help please appreciate it
    15·1 answer
  • In what country was the English royal family and nobility living before the Restoration?
    6·1 answer
  • You are an online training company and stream a lot of training videos from your
    12·1 answer
  • Weird canvas submission, I’ve done directly what the directions say to do to submit it, but it won’t submit
    15·1 answer
  • In the computing environment the numerical value represented by the pre-fixes kilo-, mega-, giga-, and so on can vary depending
    5·1 answer
  • Josh is learning about hackers know for finding loopholes in systems, without notifying the company or organization beforehand.
    13·1 answer
  • after confirming the removal of a virus from a computer, how should the technician ensure and verify the full functionality of t
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!