josegonzalez20 josegonzalez20
  • 02-03-2020
  • Computers and Technology
contestada

How to do assignment 5 on edhesive please help

Respuesta :

TaterTad
TaterTad TaterTad
  • 04-11-2020

Answer:

n = int(input("How many numbers do you need to check? "))

odd = 0

even = 0

for i in range(1, n+1):

num = int(input("Enter number: "))

if (num % 2 == 0):

 print(str(num)+ " is an even number.")

 even = even + 1

else:

 print(str(num)+ " is an odd number.")

 odd = odd + 1

print("You entered " + str(even)+ " even number(s).")

print("You entered "+ str(odd)+ " odd number(s).")

Explanation:

Can I please have brainliest?

Answer Link

Otras preguntas

In the complex number a + bi, a and b are always _________ numbers. A) imaginary B) natural C) rational D) real
why do you think the speaker of the house is second in line for presidential succession
Can someone help me with this question?
What is the refrain in “the raven?” A: nevermore B: Lenore C: rhyme D: raven
what does gildor say to Frodo about advice
ANSWER ASAP PLEASE <3
Any smart people out there please help me
Which option best completes the following sentence? Division of ______________ means focusing human efforts on fewer, more specific tasks such that laborers ar
What is the rate of change from x = π to x = 2π? trig graph with points at 0, negative 4 and pi over 2, 0 and pi, 4 and 3 pi over 2, 0 and 2 pi, negative 4
How was a railroad paid in private or public ?