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
Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. What will be the ou
lord [1]

Answer:

2

Explanation:

The output of the Java program is 2. The public Vehicle class is defined with the class variable 'counter'. When a Vehicle class object is instantiated, the counter variable increments by one.

In the program, the two instances of the class are created, incrementing the counter variable to two, the print statement outputs 2 as the result of the program.

8 0
3 years ago
Select the correct answer.
zmey [24]

the answer should be the letter a

3 0
3 years ago
Read 2 more answers
Attackers have recently launched several attacks against servers in your organization’s DMZ. You are tasked with identifying a s
kari74 [83]

Answer:

Option B is correct.

Explanation:

Well into the DMZ corporation of the user, intruders have currently conducted numerous attempts toward networks. He is associated with finding any response which would provide the greatest opportunity in the future to avoid such threats.  

The in-band IPS becomes the better approach for the required choices. Traffic moves via the IPS, as well as it has a better probability of avoiding inner processes through entering invasion.

4 0
3 years ago
What is the main task of the project manager
WINSTONCH [101]

Answer:

to handle day to day operations of a project A P E X

Explanation:

hope that helped

6 0
3 years ago
Read 2 more answers
In critical thinking, an argument is:
djverab [1.8K]
C... it’s c ok.......................
6 0
3 years ago
Read 2 more answers
Other questions:
  • What is the car on the right?
    7·1 answer
  • You can use predesigned, formatted files called _____ to create new worksheets quickly.
    13·1 answer
  • The amount of data is increasing exponentially over time. true or false.
    6·1 answer
  • Write a complete program that declares an integer variable, reads a value from the keyboard into that variable, and writes to st
    11·1 answer
  • Why do we allow electronic instruments to warm-up before use?
    11·1 answer
  • Which statement is false? Select one: a. A class is to an object as a blueprint is to a house. b. Classes are reusable software
    5·1 answer
  • How ssd is better than normal sata and pata HDD​
    11·1 answer
  • What are the features of a computer speaker​
    10·1 answer
  • _____ is the practice of using the internet to provide healthcare without going to a doctor’s office or hospital.
    15·2 answers
  • What is the difference between
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!