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
ira [324]
4 years ago
14

Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is

either heads or tails. Assume the input is a value greater than 0.
Computers and Technology
1 answer:
Nataly [62]4 years ago
7 0

Answer:

import random

decisions = int(input("How many decisions: "))

for i in range(decisions):

   number = random.randint(0, 1)

   if number == 0:

       print("heads")

   else:

       print("tails")

Explanation:

*The code is in Python.

import the random to be able to generate random numbers

Ask the user to enter the number of decisions

Create a for loop that iterates number of decisions times. For each round; generate a number between 0 and 1 using the randint() method. Check the number. If it is equal to 0, print "heads". Otherwise, print "tails"

You might be interested in
What type of security software prevents, detects, and removes malware that tries to collect personal information or change compu
Lesechka [4]
Antivirus? I think is the correct answer
4 0
3 years ago
1-5. Discuss briefly the function and benefits of computer network. (5pts​
Elden [556K]

Computer networks allow an unlimited amount of computers to communicate with each other. This is especially useful in enterprise environments, as technicians have to deal with hundreds of computers at a time. Computer networks make it easier to share files, increase storage capacity, better communication, easier to to control computers remotely, easier to share resources, ability to share a single internet connection on multiple devices. Computer networks also have a lot of cost benifits too, as network administration is centralised, meaning that less IT support is required, and you can cut costs on sharing peripherals and internet access.

Hopefully this helps you out!

7 0
3 years ago
!! HELP PLZ !!
DochEvi [55]
I think it might be short range and long-term
3 0
3 years ago
Read 2 more answers
1. The Percentage of T9 and T10 also have the wrong number format. Change them to the Correct number format(to match the rest of
pentagon [3]

Answer:

60%

Explanation:

After changing the number format of the percentages of T9 and T10, the value that now shows in T10 due to the change from the wrong format to the Right format is 60%

This is because when a value is entered into a column in a wrong format the value would be different from other values entered rightly but when the format is changed to the right format, the correct value would show up.

5 0
4 years ago
Help me plase will give brainliest
egoroff_w [7]

Export the data into a spreadsheet

5 0
3 years ago
Read 2 more answers
Other questions:
  • What does confidentiality of data refer to?
    6·2 answers
  • The code that follows saves the data that was in the $names array as
    13·1 answer
  • Once a table is inserted into a publication, which two tabs become available?
    5·1 answer
  • A student is curious about how a Web site appears on his computer screen. On a piece of paper,
    8·1 answer
  • Which of the following methods is a static method? The class in which the method is defined is given in parentheses following th
    5·1 answer
  • CC stand for.....in the email platform?
    12·2 answers
  • Do u have to divide or multiply this problem 5300 yd = mi
    9·1 answer
  • I think my knee....
    14·1 answer
  • What is a graph,a chart then give similarities between graph and chart.​
    6·2 answers
  • A computer professional's job involves analyzing computer systems for
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!