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]
2 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]2 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
When you take a multiple-choice test, you are relying on ________, a means of retrieving information out of your long-term memor
Karolina [17]

Answer:b)Recognition

Explanation: Recognition method is the technique which is based upon the similarity of the structure.It basically compares between the received format and the format of the reference on the basis of their structure.It is considered as a good method of the retrieving the image or format which is in storage. This usually results in opting the correct answer or option.

Therefore, the correct answer is option (b).

8 0
3 years ago
Write a class called SimpleSquare that has the following properties: - public int field called num - private int field called sq
mezya [45]

Answer:

public class SimpleSquare{

   public int num;

   private int square;

   

   public SimpleSquare(int number){

       num = number;

       square = number * number;

   }

   

   public int getSquare(){

       return square;

   }    

}

Explanation:

*The code is in Java.

Create a class called SimpleSquare

Declare two fields, num and square

Create a constructor that takes an integer number as a parameter, sets the num and sets the square as number * number.

Since the square is a private field, I also added the getSquare() method which returns the value of the square.

6 0
3 years ago
A doge is a shiba inu or probably a meme
Doss [256]
Yes the doge is a shiba
7 0
3 years ago
Read 2 more answers
Is this good enought to record and edit in 4k UHD? (Ultra High Definition)
vekshin1

Answer:

It should be, yes

Explanation:

5 0
3 years ago
Read 2 more answers
Elliott is trying to normalize a database that he has designed. Which is not one of the elements of 1NF or 2NF?
Kruka [31]
D. each table must depend on the entire foreing key
4 0
1 year ago
Other questions:
  • Select the strategies below that are likely to increase audience attention.
    14·2 answers
  • Who is the owner of microsoft company​
    12·1 answer
  • The sun produces energy by the process of nuclear: <br><br> A.fission <br> B.fusion
    7·2 answers
  • What port in your computer will you use to plug in your camera?
    14·2 answers
  • How many bits would be in the memory of a computer with 4kb memory?
    8·1 answer
  • To change the name of a field, press and hold or right-click the column heading for the field, tap or click ____ on the shortcut
    7·1 answer
  • What is the name for the size and style of text?
    8·2 answers
  • O Why was the Internet originally constructed? Oto enable researchers to communicate
    6·2 answers
  • PLS HELP ASAP!! which of these would be easier to do in a database program than a spreadsheet program? check all of the boxes th
    5·2 answers
  • Which is an example of machine-to-machine communication?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!