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
Most sim cards allow ___________ access attempts before locking you out.
miv72 [106K]
The answer is simple

4 0
3 years ago
So has anyone opened the link/file those people are giving out as answers? Like what are they, viruses, answers, nothing??? Some
SIZIF [17.4K]

Answer:

I see them too! I think their viruses. I tried to answer a few questions and they are on 90% of people questions. would not click on

3 0
3 years ago
Read 2 more answers
Briefly describe the fundamental differences between project-based and product-based Software Engineering.
andrew11 [14]

Answer:

Product-based companies make a specific product and try to market it as a solution. But project-based companies create a solution based on many products and sell it as a packaged solution to a particular need or problem.

Explanation:

hope this helps

8 0
3 years ago
To paste text with the same formatting as the document in which it is entered, select _____ from the Paste menu.
shusha [124]
Merge Formatting because you are merging the format of the document you copied from. So basically you are moving the format over.
3 0
3 years ago
1. What are the benefits and drawbacks of keeping separate journals for individual accounts?​
astraxan [27]

Answer:

these are some benefits Keep track of multiple areas of interest. If you want to write extensively about your day-to-day life, your exercise goals, the movies you see, and the places you visit, you might feel more organized if you have a separate place to write about each topic.

3 0
4 years ago
Other questions:
  • What term refers to a piece of software that interfaces with the hardware on your computer?
    10·2 answers
  • Morgan's cursor is blinking in the center of the page but he would like to move it to the left margin. He should _____.
    10·1 answer
  • What type of scientists studies tree rings to determine the history of an area?
    9·2 answers
  • Enter the value of 5⋅(13.5−4.5). <br> ​
    5·1 answer
  • When Twitter is used to gather a large group for a face-to-face meeting it is called a
    10·1 answer
  • What additional information could you add to a sketch to provide other team members with a more accurate design drawing?
    9·1 answer
  • Como funciona la televisión
    7·1 answer
  • An array is stored in contiguous memory locations. You access the individual array value by using the array name followed by the
    6·1 answer
  • Which of the following statements is true?A)Implicit data type conversion is performed when you mix values of different data typ
    5·1 answer
  • Q.3.1 Explain why devices on a network need addresses. (5)​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!