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
What can be designed to create annoying glitches or destroy data
Katen [24]

I guess the best answer is Virus.

Virus is a malicious computer program that is designed to create annoying glitches or destroy data.

3 0
3 years ago
Read 2 more answers
Lydia is trying to take an aerial shot from the window of an airplane. Where should she hold her camera to get the best shot?
IrinaVladis [17]
Inside The window inside the house
8 0
3 years ago
What is an indication that malicious code is running?
tatyana61 [14]

Answer:

If you are running Windows check task manager and see if any background process if running if there is a background process of command prompt or powershell, there is a chance that there is a backdoor running in your system, you can just right click and end the task it should just kick the hacker off the server.

please give brainliest

7 0
3 years ago
Which Cisco IOS command is used to disable a device from performing naming lookups?
Ilia_Sergeevich [38]

Answer:

No ip dns server.

Explanation:

The DNS stands for domain name services. It can be statically or dynamically configured to a workstation from the DHCP request. It resolves the ip address of a server to it's name, so a client is not burdened by memorizing the ip address of every website.

In the cisco ios,  the "NO" command is used to negate other commands, so when a "no ip dns server" is used configured on a device, it stops every website name lookups.

3 0
4 years ago
Marianne needs to create a version of her slide presentation that does not include all the slides and will be used for
Morgarella [4.7K]

Answer:

B is the correct answer because that's what I do

8 0
3 years ago
Read 2 more answers
Other questions:
  • In the excerpt above, what can be inferred by the statement, “The Dillingham had been flung to the breeze during a former period
    13·2 answers
  • An auxiliary view is always projected from the view that shows the inclined surface as a(n) _____.
    14·1 answer
  • Who killed mrs.huffington
    14·1 answer
  • Joining strings together is known as?
    7·1 answer
  • You've been hired by Maple Marvels to write a C++ console application that displays information about the number of leaves that
    5·1 answer
  • Expliquer les règles à respecter quand on fait une recherche sur internet.
    7·1 answer
  • To help determine to which application a transmission should be delivered on a particular computer, TCP uses the application lay
    8·2 answers
  • __ allow(s) users with mobility issues to control the computer with their voice.
    6·2 answers
  • Does anyone know how to do Python Essentials 5.7.1.6 because i am completely lost
    5·1 answer
  • The short-range two-way communication technology behind contactless payments is called ____.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!