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
A(n) ____ backup only archives the files that have been modified since the last backup.
NemiM [27]

The answer is incremental backup as this is the one responsible of having to provide a backup with files that are modified since the last backup it has received, it is considered to be a backup in which is a type of security copy.

3 0
4 years ago
Buying an existing business
HACTEHA [7]
Goin to make great profit
8 0
3 years ago
In what form do the hexadecimal numbers need to be converted for a computer’s digital circuit to process them?
MrMuchimi

Hexadecimal numbers are just a convenient representation of binary data. When entered as text, they consist of ASCII characters 0-9 and a-f. The numbers will then have to be converted to binary. This is accomplished by converting to uppercase, subtracting the ASCII offset (48 for 0-9 or 55 for A-F), so that the result is a number between 0 and 15 (inclusive). This can be stored in computer memory to represent 4 bits.

Hexadecimal numbers represent binary numbers in the following way:

hex | binary

0 = 0000

1 = 0001

2 = 0010

3 = 0011

4 = 0100

5 = 0101

6 = 0110

7 = 0111

8 = 1000

9 = 1001

a = 1010

b = 1011

c = 1100

d = 1101

e = 1110

f = 1111

As you can see, no other 4 bit combination exists.



5 0
4 years ago
Which of the following are incident priorities?
xenn [34]

Answer:

what are the options?

reply in comment so i can help:)

5 0
3 years ago
To join a social network you create an avatar true or false
svp [43]
False because not all social media webstites provide avatars
7 0
3 years ago
Read 2 more answers
Other questions:
  • Who is president is US
    5·1 answer
  • Identify the computer cycle in each of the descriptions below by choosing the answer from the
    12·1 answer
  • The _________ indicates the number of elements, or values, an array can hold
    14·1 answer
  • To check if your operating system is up to date, click Start then click Control Panel and choose _______________. Select one: a.
    11·1 answer
  • Which of these is the fastest transmission medium?
    11·2 answers
  • What feature should be used before a document is printed
    8·1 answer
  • Fill in the blank with the correct term.
    10·2 answers
  • 1. Name the three kinds of Eraser in Photoshop. <br>​
    8·2 answers
  • Writing queries in sql to compile data from a database is related to the physical level of databases true or false?.
    10·1 answer
  • suppose a malloc implementation returns 8-byte aligned addresses and uses an explicit free list where the next and previous poin
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!