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
Routers do not forward broadcast packets.A. TrueB. False
mestny [16]
The answer you’re looking for is false
5 0
3 years ago
Ternary operators of computer<br><br>please explain. ​
Nitella [24]

Answer:

It's a compact way of doing an if-else statement.

General Format is

<<em>condition</em>> ? <if condition is true> : <else>;

Example:

I could rewrite:

  if(a==1) temp = 1;

  else     temp = 999;

as

  temp = (a==1) ? 1 : 999;

5 0
3 years ago
A hacker has successfully infected an internet-facing server which he will then use to send junk mail, take part in coordinated
julia-pushkina [17]
Botnet Trojan. Hopefully that’s helpful :)
5 0
3 years ago
Dotted Decimal Notation was created to______________. Group of answer choices provide an alternative to IP addressing express ea
BaLLatris [955]

Answer:

Both b and c

Explanation:

Dotted Decimal notation is a presentation of numerical data which is expressed as decimal numbers separated by full stops. Dotted decimal notation expresses each eight bit sections of 32 bit numbers as decimal value. It provides convenient notation which is easy to understand by the people who are IT experts.

3 0
3 years ago
The assignment symbol can be combined with the arithmetic and concatenation operators to provide augmented assignment operations
uranmaximum [27]

Answer:

Yes, we can.

Explanation:

We can combine with the arithmetic and the concatenation operators to provide augmented assignment operations in the programming language Python.

This mean we can abbreviate expressions like n = n + 1

For example:

n += 10 this is equal to n = n + 10

n += "example" this is equal to n = n + "example"

In this example we have

variable = variable operator expression equal to variable operator = expression.

These arguments are often used in Python's loops.

3 0
3 years ago
Other questions:
  • Which command on the Insert tab of the PowerPoint Online application is used to add a Venn diagram or process chart to a present
    12·2 answers
  • What is the most recognized and widely used database of published nursing practice literature?
    15·1 answer
  • Which expense is a bank least likely to extend a line of credit for?
    13·2 answers
  • What is secondary exchange ? - Apex
    14·1 answer
  • Which finger types the return or enter key?
    6·2 answers
  • "The effectiveness of memory retrieval is directly related to the similarity of cues present when the memory was encoded to the
    11·1 answer
  • The World Wide Web is full of unstructured data. Search engines like Google, Bing and Yahoo have been doing a good job of allowi
    5·1 answer
  • Doctors at a regional hospital access an online database of patient records that is being developed and tested by a conglomerate
    13·1 answer
  • Which of the following Access objects provides a user-friendly data entry method?
    7·1 answer
  • TO Cloud
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!