olverac174 olverac174
  • 20-09-2022
  • Computers and Technology
contestada

# Your task is to modify the previous examples code to
# print out all the even numbers from 1 to N where N is
# an int from the user

Your task is to modify the previous examples code to print out all the even numbers from 1 to N where N is an int from the user class=

Respuesta :

mmuiekbb
mmuiekbb mmuiekbb
  • 21-09-2022

Answer:

n = int(input('N: '))

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

   if i % 2 == 0:

       print(i)

Answer Link

Otras preguntas

If T(n) = 2-7n, what is the 1st term?
a bank contains 27 coins consisting of dimes and quarters. the coins have a total value of $4.95. Find the number of dimes and quarters in the bank.
A bedroom measures 15 ft by 14 ft with a closet that measures 4 ft by 8 ft. if carpet costs $4.25 per foot, how much will it cost to carpet the room and closet.
Show that sum of any two medians of a triangle is greater than the third median.
How do I solve this operation
Which of the following is the least? A.0.105B.0.501C.0.015D.0.15 I don't need an answer i need an explanation
what is the y-intercept of the function: f(x)=x+4
Please help simplify with steps
I need an essay on letter's importance in hindi
what is the advantage of most seeds going through a stage of dormancy before germination?