1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Stels [109]
3 years ago
5

We will pass in a value N. Ouput every even value between 0 and N. Tip: you may remember the modulo operator. 10 % 3 returns the

remainder of 10 divided by 3. You can use this in a decision to determine whether a number is odd or even. Just think about what makes an even number even and all should become clear!
Computers and Technology
1 answer:
Taya2010 [7]3 years ago
6 0

Answer:

def odd_even(N):

   for number in range(0, N+1):

       if number % 2 == 0:

           print(str(number) + " is even")

       elif number % 2 == 1:

           print(str(number) +" is odd")

odd_even(5)

Explanation:

- Create a method called odd_even that takes one parameter, N

- Initialize a for loop that iterates through 0 to N

Inside the loop, check if module of the number with respect to 2 is equal to 0. If yes, print it as even number. If module of the number with respect to 2 is equal to 1, print it as odd number

Call the method

You might be interested in
What does a mother board in a computer do?
IRINA_888 [86]

The motherboard is the central component of a computer. Without it, the computer would not work. The mother board is sometimes called "the heart of the computer" because it allows thinks to function properly.

The motherboard of the computer is the part that holds the system memory and audio. It's a printed circuit board.

4 0
3 years ago
HELPPP!! Ghost_diary
Elena-2011 [213]

Answer:

manga or an anime a a a a a a a a

8 0
3 years ago
How do I create a videogame
mote1985 [20]

Answer:

-Learn how to code

-Make Character

-Design

-Go to classes

-Go on video game platforms and make an video game(rblx is the best in my opinion)

-Play video games and see the scripts

-Decide what type of video game your making(horror, family game, battle game, etc.)

Explanation:

3 0
3 years ago
Why do we install doorbells in our house
Vinil7 [7]

Explanation:

It's placed near the door. When a visitor presses the button, the bell rings inside alerting you that someone is at the door.

6 0
3 years ago
Read 2 more answers
What is the next line?
bazaltina [42]

Answer:

2

Explanation:

because

5 0
3 years ago
Other questions:
  • A. True
    8·2 answers
  • ____ are systems in which queues of objects are waiting to be served by various servers
    5·1 answer
  • What causes air pollution in your community?
    13·1 answer
  • What will be displayed after the following statements execute? int funny = 7, serious = 15; funny = serious % 2; if (funny != 1)
    10·2 answers
  • Which of the following is a benefit, as well as a risk, associated with peer-to-peer networks?
    11·2 answers
  • We can include following item(s) during configuration itemidentification:
    10·1 answer
  • Hard and soft skills can both be transferable skills. *<br><br> True<br><br> False
    5·2 answers
  • Which of the following is NOT a useful strategy when making an informed purchase ?
    7·1 answer
  • Select four tasks associated with operating system maintenance. Cleaning inside the computer Defragmenting the hard drive Deleti
    11·1 answer
  • What is the final step when creating an appointment to ensure that the content of the appointment is stored in Outlook?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!