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

Plz Help Me !how do you calculate the difference between mode and absolute deviation
What is the function? 4th grade math
Consider a perfectly competitive market described by the supply function P = 10 + 0.2Q and demand function P = 60 - 0.3Q. If the market is in equilibrium, then
special name given to angles greater than 180 but less than 360
Rebecca's buys some scarves that costs $5 each and 2 purses that cost $12 each. The cost of Rebecca's total purchase is $39. What equation can be used to find n
Something that causes and event to occur is known as a(n) __________.
What is the genotype for heterozygous Tall plants? A. TT B. Tt C. tt D. Tall
Because she was charming, pretty, and smart, John looked forward to meeting Carolyn again after three years. On the other hand, he also felt some trepidation. F
chlorine and element x have similar chemical properties an atom of element x could have an electron configuration of
Three of the four statements below represent your credit responsibilities. Select the one answer that does not represent your credit responsibilities. Select on