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

Who was first host of the alien symbiot venom
How did mass production contribute to the rapid economic growth of the late 1800s?
The first part of writing a negative message usually involves either neutral or positive information known as a:
How is energy obtained by ingested foods in cellular respiration?
How many different three-number "combinations" are possible on a combination lock having 25 numbers on its dial? assume that no numbers repeat. (combination loc
Which of the following were all artistic achievements of the Chinese? a. silk weaving, poetry, jade carving b. jade carving, paper making, wheelbarrow c. acupun
What is the best way to punctuate the bolded portion of the sentence? Kurt Vonnegut’s book, Welcome to the Monkey House, includes the short story A Long Walk
What is meant by the description "antiparallel" regarding the two strands of nucleic acids that make up dna?
The first tetrapods (four-legged animals) were amphibians, which evolved from a specialized group of lobed-fin fish. an unusual fossilized animal (named tiktaal
What’s the answer to 2/3h=-9