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
zloy xaker [14]
3 years ago
15

Write a program that generates 100 random numbers and keeps a count of how many of those random numbers are even and how many of

them are odd.
Computers and Technology
1 answer:
Anvisha [2.4K]3 years ago
8 0

Answer:

import random

numbers = []

even = 0

odd = 0

for i in range(100):

   numbers.append(random.randint(1, 200))

for i in range(100):

   if numbers[i] % 2 == 0:

       even += 1

   else:

       odd += 1

print("Even:", even)

print("Odd:", odd)

Explanation:

Gg ez.

You might be interested in
Add this in binary numbers . (1100011+11111+111) ​
Brut [27]

see the attachment..........

8 0
2 years ago
Read 2 more answers
Define a function PrintFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. Ex: PrintF
DaniilM [7]

Answer:

The function declaration to this question as follows:

Function declaration:

//declaring method printFeetInchShort, that accepts two integer parameters

void printFeetInchShort(int numFeet,int numInches) //method

{//method body

printf("The given height is: "); // message printing

printf("%d\'%d\" ", numFeet,numInches); //value printing

}

Explanation:

In the above method (function) declaration a method "printFeetInchShort" is declared, that accepts two integer variable as its parameters.

  • This method uses a return type void, which means it will not return any value.  
  • The parameter "numFeet and numInches" accepts an integer value in the main method and inside the method, it will print its value by a single and double quote.
5 0
3 years ago
Variable costs are __________.<br><br> A. decreasing<br> B. increasing<br> C. static
lubasha [3.4K]
The answer is A. Decreasing
5 0
3 years ago
this weekend you areplanning to complete part of your assignment at the library to do this you need to store data on a removable
Archy [21]
A flash drive, it can be put into a USB port and the computer will register it and you should be able to pull up anything you store on it on a another computer or device you are using.

4 0
3 years ago
The code needs to be done in Coral
Leni [432]
Caffeine_mg = float(input())
six_hours = caffeine_mg / 2
twelve_hours = six_hours / 2
twenty_four_hours = twelve_hours / 4
print('After 6 hours: {:.2f} mg'.format(six_hours))
print('After 12 hours: {:.2f} mg'.format(twelve_hours))
print('After 24 hours: {:.2f} mg'.format(twenty_four_hours))
6 0
2 years ago
Other questions:
  • . When you have multiple graphics positioned on a page, you can _______________ them so that they are a single graphic instead o
    9·1 answer
  • Which tabs are expandable and collapsible? This would be in word 2010
    6·1 answer
  • Susan teaches many individuals and business professionals how, why, and the benefits and challenges to using social media. Of th
    15·1 answer
  • Which line in the following program contains the prototype showDub function? 1 #include 2 using namespace std; 3 void showDub(in
    12·1 answer
  • What is working with others to find a mutually agreeable outcome?
    8·2 answers
  • When using the Simple Query Wizard, Kirsten wanted to transfer all of her available data to a new table. She should click
    14·1 answer
  • What are the values of a[k] and a[k+1] after code corresponding to the following pseudocode runs?
    9·2 answers
  • CAN SOMEONE PLEASE HELP ME WRITE AN INTRODUCTION ??? COMMENT FOR TOPIC
    11·1 answer
  • 26. Universal Containers (UC) has a queue that is used for managing tasks that need to be worked by the UC customer support team
    11·1 answer
  • Which device is used to direct the flow of data on a computer network?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!