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

What are some factors that influence how individuals invest their money? what should individuals keep in mind when investing money?
true or false 12. The set of good students in our class is a well defined set
Which of these would most likely happen if Earth stops revolving around the sun but continues rotating on its axis
Triangle ABC has measures a = 2, b = 2, and m∠A = 30°. What is the measure of angle B? 15° 30° 45° 60°
Nelson Mandela's early political education and inspiration was primarily gained through
When particles move out of a cell through facilitated diffusion, the cell A. first gains and then uses energy B. does not use energy C. uses energy D. uses en
The narrative point of view that uses “I” and “we” to narrate a story is called __________. first person second person third person, objective third person, lim
the volume of the room, giving that it is 3 metres high
A coach wants to know if basketball players who warm up before a game will shoot more points than those who don't warm up. He will break the team up into two gr
Consider four atoms from the second period: lithium, beryllium, boron, carbon, and nitrogen. which of these elements has the lowest electronegativity value?