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
tekilochka [14]
2 years ago
8

If anyone knows how to code on python:

Computers and Technology
1 answer:
Allushta [10]2 years ago
5 0

Answer:

def dice_roller():

   # ask for first input

   input1 = int(input("Enter the first roll: "))

   # check if it's valid

   while input1 < 1 or input1 > 6:

       print("Invalid number")

       # ask for new input if the previous was invalid

       input1 = int(input("Enter the first roll: "))

   # ask for second input

   input2 = int(input("Enter the second roll: "))

   # check if it's valid

   while input2 < 1 or input2 > 6:

       print("Invalid number")

       # ask for new input if the previous was invalid

       input2 = int(input("Enter the second roll: "))

   # check of the numbers are the same

   if input1 == input2:

       print("You rolled the same numbers. Try again")

       # if they are the same call this function again to get new numbers

       dice_roller()

   else:

       # print how many spaces to advance

       print("Advance", input1+input2, "spaces")

if __name__ == '__main__':

   dice_roller()

Download txt
You might be interested in
30 POINTS!!
bulgar [2K]

Answer:

online

the answer is online

7 0
3 years ago
How do you use hand sanitizer <br><br><br><br><br> I need helpppp
Dimas [21]

Answer:

Scientifically speaking both are equally as effective as long as you thoroughly cover the surface of your hands, massage between your fingers, and under your nails.

Explanation:

3 0
3 years ago
gina wants to add another resistor to this circuit. She wants to ensure that after the new resistor is added, it will all work i
Bas_tet [7]

D) one lead in front of the current resistor, one behind it:

Explanation:

5 0
4 years ago
Read 2 more answers
The possibility of devices outliving a manufacturer, leaving them without long-term support against vulnerabilities is a possibl
Dafna11 [192]

Answer: Security (updating of software and hardware)

Explanation:

Internet of Things is one of the latest inventions in technology wherein smart objects and devices can connect to the internet and also share information within that space.

One of the several challenges of the Internet of Things is Security. Because of the introduction of the Internet, there is a vulnerability to hacking. Upgrades, therefore ought to be regularly provided so as to prevent hackers from recognizing patterns and hacking into them. So when the device outlives the manufacturer, there would be no one to provide regular updates thus making the device vulnerable.

8 0
4 years ago
The graphic shows a cause and effect organizational aid.
nika2105 [10]

Answer:

gets good grades

3 0
3 years ago
Other questions:
  • Write a new function called "listmax" based on the following IPO # function: listmax # INPUT: a list # PROCESSING: obtains the l
    9·1 answer
  • ____ are the device drivers that provide the interface to I/O hardware.
    9·1 answer
  • What is syntax?
    6·1 answer
  • Once i have internet connection do i need anything else to surf the web
    6·1 answer
  • What is a expansion card for computer?
    5·1 answer
  • When do you need to use a fully qualified url in a hyperlink?
    6·1 answer
  • Kendra is taking a class in Finance and she has been asked to give a speech about a case study in which she's been working. She
    5·1 answer
  • When a bank account pays compound interest, it pays interest not only on the principal amount that was deposited into the accoun
    10·1 answer
  • Hey!! Can u help me please!!​
    12·2 answers
  • How is unqualified assumptions a disadvantage of communication​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!