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

At top speed, the space shuttle can move as fast as 7,860 meters per second. At this rate, how many meters can it travel in a minute?
DOES JOHN HEAR GARFIELD?
Create a word problem for 8x(-0.25)
Electric charges that are different attract each other.
According to Kepler's law of harmonies, which of these planets takes the longest to orbit the Sun? Mars Jupiter Venus Neptune
Are the verb tenses in the sentence consistent, or do they shift unnecessarily? The squirrel stuffed the pecan into its mouth and scampered up the tree. a. The
Simone earns $ 35 a day at her job, plus $ 4 per hour of overtime. If she made $55 for one day's work, how many hours of overtime did she work
There was a surplus of office space in a city, with 400,000 square feet, or 16% of the total office space, vacant. How much office space did the city have?
The trail around the lake us 7 kilometers long it takes Manuel 35 minutes to run the trail what is his unit rate
who determines the candidates in Iran's elections? a. clerics b. military leaders c. the European union d. reporters