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
Valentin [98]
3 years ago
5

Need help on Assignment 4: Evens and Odds

Computers and Technology
1 answer:
Sliva [168]3 years ago
8 0

n = int(input("How many numbers do you need to check? "))

even = 0

odd = 0

for x in range(n):

   num = int(input("Enter number: "))

   if num % 2 == 0:

       even += 1

       print(str(num) + " is an even number.")

   else:

       odd += 1

       print(str(num) + " is an odd number.")

print("You entered " + str(even) + " even number(s).")

print("You entered " + str(odd) + " odd number(s).")

This works for me. Best of luck.

You might be interested in
Does anyone know why I get notifications on Brainly that say they are from 4 hours ago even though they were just answered
const2013 [10]

Answer:

Could be a glitch in the system

4 0
2 years ago
READ CAREFULLY! There is a difference between moving and copying files.a. Create a directory named . For example, mine would be
OleMash [197]

Answer:

b

Explanation:

8 0
3 years ago
What will the following code print out: int numbers [] = {99, 87, . 66, 55, 101}; for (int i = 1; i < 4; i++) cout << n
forsale [732]

Answer:

87 66 55

Explanation:

Array is used o store the multiple values with same data type.

the array show a decimal value .66, i assume this is enter by mistake because option has no decimal value.

The index of the array is start from zero, it means the first element store in the array at position zero.

In the for loop the variable 'i' start from 1 not zero and it goes to i<4 means i=3.

So, it access the element from 2 to 4 because the index is position of element less than 1.

Therefore, 87 66 55 print.

5 0
3 years ago
Which tab automatically becomes available after inserting a text box? Drawing Tools Insert Text Box Tools Shape Tools
In-s [12.5K]

Answer:

insert text box

Explanation:

6 0
3 years ago
Read 2 more answers
from january 2005 through july 2015, approximately how many electronic data records in the United States were breached, exposing
Brums [2.3K]
From January 2005 through July 2017, approximately 853 million electronic data records in the US were breached.
This allowed the attackers to take control over people's personal data, such as their various credit card numbers, and other important data, as well as their addresses, etc. The cyber police, as well as the regular police have been working hard to stop this from happening, but the hackers are very strong and smart.
4 0
3 years ago
Other questions:
  • John would like to move from the city into the suburbs and has been saving up a large down payment for a home. Which is the most
    7·1 answer
  • What is an IP address and where I can find the IP address for my computer?
    14·1 answer
  • Write a algorithm to attend birthday party​
    8·2 answers
  • What can a scientist do if he repeats and experiment and gets diffrent results?
    5·1 answer
  • Which option represents the location of the Goal Seek function?
    8·2 answers
  • Plz answer this....quickkkkk​
    7·2 answers
  • THis took FOREVER! please go check it out, if you have seen my demo to this game, you will like the full version! https://scratc
    9·2 answers
  • What is the binary conversion of 179.187.223.21?
    11·2 answers
  • A row-level trigger requires use of the _____ keywords and is executed once for each row affected by the triggering statement.
    7·1 answer
  • 7. A(n) is the address of a document or other file accessible on the Internet.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!