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 the products of the hydrolysis of ATP? What else is released during this reaction?
The legs of an isosceles triangle have lengths x + 1 and -x + 7 . The base has length 3x - 3. What is the length of the base?
how do i write 2m in a verbal expression?
What is 1/125 as a decimal
374 exceeds three times a number by 74
Which type of blood vessel can a pulse be easily detected? Please help!
What are three equivalent ratios to 18:4
What kind of animal tissue functions in transmitting messages rapidly through the body?
This is science A girl cycles for 3hrs at a speed of 40km/h --what distance did she travel
A right triangle has a hypotenuse of length 35. The ratio of the length of the shorter leg to the longer leg of the triangle is 3:4. What is the length of the s