Assignment 4: Evens and Odds
Instructions

Write a program that will ask a user for how many numbers they would like to check. Then, using a for loop, prompt the user for a number, and output if that number is even or odd. Continue doing this as many times as the user indicated. Once the loop ends, output how many even numbers were entered and how many odd numbers were entered.

Hint: For a number to be even, when the number is divided by 2, there should be no remainder - so you will want to use the modulus (%) operator.

Hint: You will need two count variables to keep track of odd and even numbers.

Sample Run 1
How many numbers do you need to check? 5
Enter number: 20
20 is an even number.
Enter number: 33
33 is an odd number.
Enter number: 4
4 is an even number.
Enter number: 77
77 is an odd number.
Enter number: 8
8 is an even number.
You entered 3 even number(s).
You entered 2 odd number(s).
Sample Run 2
How many numbers do you need to check? 3
Enter number: 10
10 is an even number.
Enter number: 3
3 is an odd number.
Enter number: 400
You entered 2 even number(s).
You entered 1 odd number(s).

Sample Run 2
How many numbers do you need to check? 3
Enter number: 10
10 is an even number.
Enter number: 3
3 is an odd number.
Enter number: 400
You entered 2 even number(s).
You entered 1 odd number(s).

Benchmarks
1. Create and initialize two count variables - one for odd and one for even.
2. Prompt the user to answer the question, “How many numbers do you need to check?"
3. Based on the previous input, create a for loop that will run that exact number of times.
1. Prompt the user to “Enter number: “
2.If that number is even, output “[number] is an even number.”
3.Update the even count variable.
4.Or else if the number is odd, output “[number] is an odd number.”
5.Update the odd count variable.
4.Output “You entered [number] even number(s).”
5.Output “You entered [number] odd number(s)."

Answers

Answer 1
Wow that is really long

Related Questions

Which of the following is not an operating system?
A. Linur

B. Nexus

C. Mac OS

D. Windows

Answers

Answer:

Nexus

Explanation:

I assume A should be "Linux" instead of "Linur". Mac OS, Windows, and Linux are all common operating systems

Which are options available for formatting tables? Check all that apply.

merging cells
including quotes
splitting cells
including shading
including borders

Answers

Hey,

so the sort answer is all but B "including quotes"

the long answer is that all of them but b are for formatting aka style.

Hope this helps

-scav

Answer:

A,C,D,E

Explanation:

Part B
The store owner put 8 T-shirts on clearance. The T-shirts were originally priced at $18.00 each. The owner marked down the price of the
T-shirts by 35%
How much money did the store owner receive for selling all 8 T-shirts? $50.40
$93.60
$116.00
a $141.20

Answers

Answer:

$93.60

Explanation:

Given the following data;

Number of T-shirts = 8

Cost price = $18 each

Discount = 35%

To find the selling price;

First of all, we would calculate the price after the discount.

Discount price = 35/100 × 18

Discount price = 630/100

Discount price = $6.3

Now, we find the selling price for each;

Selling price = cost price - discount price

Selling price = 18 - 6.3

Selling price = $11.7

Total revenue = selling price * number of shirts

Total revenue = 11.7× 8

Total revenue = $93.60

Therefore, the store owner received $93.60 for selling all 8 T-shirts.

When creating and modifying templates, which keys are used to add placeholders?
Alt+F9
Shift+F8
O Delete+F8
Ctrl+F9

Answers

Answer:

On the Slide Master tab, click Insert Placeholder, and then click the type of placeholder that you want to add. Click a location on the slide layout, and then drag to draw the placeholder. You can add as many placeholders as you like. (For Power point) But not sure about a short cut for it. Hope this helps!

Answer:

Insert Placeholder

Explanation:

Which IDEs support multiple high-level programming languages? Select all that apply.
Eclipse
Visual Studio
Xcode
Linux

Answers

Answer:

eclipse, xcode, and visual studio

Answer:

1,2, and 3

Explanation:

b) State two factors that may cause interference of the WiFi signal for his network

Answers

Answer:

Ping

Mbps Speed (Download or Upload)

Brainliest Please.

Tell me if im right please!!

Need Help ASAP! You might create a flowchart as part of the ___
phase of a software development project.
release
testing
design
coding

Answers

Answer:

design .

Explanation:

Answer:

Design

Explanation:

need help asap please​

Answers

Because you can make it to where they cannot find or see or look or talk or anything on your profile it can cut off Comunication from the person. It can also protect your safety!

I need to change the subject before they get onto me. I am only revealing info today if you are a friend.

Let's change the subject to the Tillinghan Mystery (Totally not related to the Dad Mystery)

Who is Tillinghan, and what is his website?

Answers

Answer:

uuuuummmm i have no idea what your doing but tillingan is a doctor and his website is to sell children over internet

Explanation:

im scared of myself ik

For questions 2-4, consider the following code:

if (month ==9):
if (day > 15):
print ("Second half of the month")
else:
print ("First half of the month")
else:
print ("Not in September")
What is the output if month = 9 and day = 14?

Answers

Answer:

First half of the month

Explanation:

Given

The above lines of code

Required

Determine the output if month = 9 and day = 14

The first if statement: if (month ==9):  checks if month equals 9.

This statement is true, so the next statement is executed.

The next executable statement:

if (day > 15):

checks if day is greater than 15.

This statement is false, so the else statement is executed

else:

print ("First half of the month")

The above statement is executed and the string "First half of the month" is printed

Answer:

e

Explanation:

PLEASE DO ME THIS SOLID .... IM TRYING MY HARDEST IN THIS CLASS........Select the TWO correct statements about the features of presentation programs.

Slide transitions are visual effects that signal the shift from one slide to another. Speaker Notes allow you to add notes to help you remember what you need to say. Speaker Notes also allow you to show different pieces of information to different audiences. The Hide Slide option allows you to hide and unhide Speaker Notes

Answers

Slide transitions are visual effects that signal the shift from one slide to another.Speaker Notes also allow you to show different pieces of information to different audiences.

Hopefully, it's correct... ( ˙ ˘ ˙)

A program uses 4 bits to store numbers. When it adds 10 and 7, the result is 1. Which of the following best explains why?
1) the program is reporting the number of bits required to compute the sum
2) an overflow error led the program to reset to O at the number 16
3) 1" is an error code that indicates a rounding error
4) 4 bits is not enough to represent the number 10, so the computer reported only the tens value

Answers

Answer:

2

Explanation:

overflow

A data type overflow issue typically occurs when the data type used to store the data was unable to accommodate the data. In addition, some data types are limited in the size of the numbers they can hold. If a data type is a single byte and the amount of data to be saved is larger than 256, an overflow error will be generated. Thus, option B is correct.

What an overflow error led the program to reset?

Using exception handling, these mistakes can be addressed. We will examine this exception handling in the section that follows.

We observed the Overflow error in the aforementioned programs, which happens when the current value exceeds the limit value. Furthermore, we must raise the overflow Error exception in order to manage this.

Therefore, When software encounters an overflow error, it means that it tried to write data outside the memory's capacity. Every program has memory set aside for a stack.

Learn more about overflow error here:

https://brainly.com/question/27493058

#SPJ2

what are boot sector virus ?

Answers

Answer:

A normal virus

Explanation:

Answer: Any Virus that loads during boot

-DoggyMan5

What is a mixer? BTW NOT just any mixer....a mixer in music
THis is for tech theater class

Answers

Answer:

it changes the level of music, such as bass level or sweter level

A 25 kg child slides down a waterslide 4 meters high. How fast is child going
when he reaches the bottom of the slide?

Answers

Answer:

Speed of child = 8.94 m/s

Explanation:

Given:

Mass of child = 25 kg

Height = 4 meter

Find:

Speed of child

Computation:

P.E = mgh

P.E = (25)(10)(4)

P.E = 1000 J

K.E = P.E

So,

(1/2)(m)(v)² = 1000

(1/2)(25)(v)² = 1000

(v)² = 80

v = 8.94 m/s

Speed of child = 8.94 m/s

PLEASE ANSWER ASAP!!
Where does each box go?

suppose cell C5 contains the formula =B$6+C1 that you copy to the cells B8, C10, D6, and E5. match each formula what it will be when copied to its respective cell

(a) =A$6+B4
(b) =B$6+C6
(c) =C$6+D2
(d) =D$6+E1​

Answers

Answer:

I think A belongs to the second one

Use the table on the right to convert from hexadecimal to binary.
The binary value of hexadecimal D is 1101.

The binary value of hexadecimal 9 is 1000.

The binary value of hexadecimal C is 1110.

The binary value of hexadecimal F is 17.

Answers

Answer:

what is the question and answers?

Answer:

The binary value of hexadecimal D is 1101

Explanation:

edge 2021

This is a mobile phone mast.
Underground there are fibre cables to the mast. The material that
these cables are made out of is a flexible and because they are
transparent the pulses of
_that travel through them can do so
very quickly. These masts are always positioned in places that do not have a
lot of buildings or trees that will cause
The
the
mast the wider the area that it will cover. These days mobile masts can deliver
2G, 3G, 4G or
When you make a phone call your phone converts your voice to
waves that travel to the nearest mast. The mast then sees if the call is to a
landline or another mobile phone and diverts the call to where it needs to go.
The mobile phone operator breaks the UK into sections or 'cells' and each cell
contains a
Each cell covers its small area. This is why mobile
phones are called 'cell phones' in other countries such as
Look at
the image below so see how areas are split into cells. The more densely
populated the area the more masts there will be therefore you will see more
masts in
areas that you would in
areas.

Answers

Answer:

1) Optic

2) Optical fiber

3) Light

4) Blockage

5) Taller

6) 5G

7) Radio

8) Mast

9) The Unites States of America

11) High population density (No image)

12) Low population density (No image)

Explanation:

1) Underground there are fibre optic cables

2) The materials that these cables are made out of is a flexible optical fiber

3) pulses of light that travel through them

4) buildings or trees that will cause blockage

5) The taller the mast the wider the area that it will cover

6) 2G, 3G, 4G, or 5G

7) Converts your voice to radio waves

8) Each cell has a mast

9) Mobile phones are called 'cell phones' in countries such as The Unites States of America

11) You will see more masts in high population density areas (No image)

12) Than you would in low population density (No image)

1. Which one of the following is true about screening interviews?
(1 point)
O A. They always take place face-to-face
O B. They take longer than face-to-face interviews
O C. They help determine the top candidates to bring in for a face-to-face interview

Answers

Answer:

C

Explanation:

They usually exist as a way to filter out unfit candidates so only serious people are actually given the time of a full interview.

Screening interviews are helpful in determination of the most suitable candidates to be called for the face-to-face interviews.

What are interviews?

A set of appropriate questions asked to the person with a view to listen and assess the response with a definite purpose is known as an interview. Screening and face-to-face are two types of interviews.

Screening interviews are like trial interviews that help in getting a result and shortlisting of appropriate candidates, who may be suitable for the role that the institution is seeking for.

Hence, option C holds true regarding the screening interviews.

Learn more about interviews here:

https://brainly.com/question/15128068

#SPJ2

1 pound is equivalent to how many grams?
A.463.59 grams
B.10 grams
C.59 grams
D.5 grams​

Answers

A, because it makes sense and i asked siri

what is the importance of keeping information private and secure online​

Answers

Keeping information private and secure online can ensure your safety. Many people can figure out your full name, address, school name, etc through the internet.

I'm skeptical about (b) , is this accurate or the ranges should be listed differently ?​

Answers

Answer:

My guess would be C2-C11, But I may be wrong

Imagine a graph

Hope this helps....

Use the table on the right to convert from decimal to hexadecimal.

The hexadecimal value of decimal 12 is F.

The hexadecimal value of decimal 9 is 1001.

The hexadecimal value of decimal 9 is 11.
The hexadecimal value of decimal 10 is A.

Answers

Answer:

what is the question and answers?

Answer:

the hexadecimal value of decimal 10 is A

Explanation:

The best way to get clarification from someone is by

Answers

Answer:

Admit that you are unsure about what the speaker means.

Ask for repetition.

Answer: can you simplify that for me I don’t understand.

A computer follows step-wise instructions to complete any task which is known as?

Answers

Answer:

Programming

Explanation:

Programming is the step by step instructions given to a computer.

Will give 5 star and the mark brainleist

Answers

I think it’s “head”????
it would be
because it has to start and end with the same thing
and since it says student grades it has to end in

what is your opinion on gaming? do you think it has more positive or negative impacts

Answers

Answer:

positive bc you can learn from them wwhat to do what not to do mistakes that you wont make in. real life

Answer

Positive Impacts

Enhances the Cognitive Functions – The online gamers can improve their cognitive functions by playing online games. The combination of focus and the surges of neurotransmitters will strengthen the neural circuits that make the brain.

Decision-Making and Accuracy – The online gamers can able to make the quick decision. Online gaming trains the brain to take quick decisions without losing the precision. Without any doubt, you can play these games in order to make quick & accurate judgments.

Hand and Eye Function – It is needless to mention that, the online gamers will play their games with the utmost coordination of their hand and eyes. Every online game requires the players to use their hand and eye for the game to be successful.

Enhance the Teamwork – Multiplayer online games will enhance the teamwork among the gamers. The gamers will use the most of their skills to win the game for their team. The gamers will learn about winning the game as a team.

Negative Impacts

Aggressive Behavior – Every player would like to win the game and hence they develop aggressive behavior. The shooting games will induce bad vision to the gamers and the gamers see the society in the same vision.

Loner – Of course, the gamers that spend most of their time in playing online games cannot spend time with their friends and families. If the same thing continues, they want to be alone all the time.

Wrong Values – Certain online games teaches wrong values to the gamers. The online games depict women as weaker characters and sexually provocative characters. The gamers will take that and they do behave badly with the women in reality.

Impact on Health – Yes, the gamers that take part in playing the online games would not like to participate in any such activities that make them fit and fine. Not taking part in the fitness activities leads to health disorders like video induced seizures, obesity, skeletal and postural disorder, never compression, muscular disorder, numbness in shoulders, hands and elbows.

Bad Academic Performance – Playing online games for a long time will create a negative impact on your child’s academic performance. The more your children spend in playing online games, the sooner they fall asleep. Lack of concentration will be an issue to the children that spend more time in playing online games. Some children would fall to the online games and a kind of addiction will happen to them.

Explanation:

Now, I hope that you might have understood the optimistic and pessimistic effects of playing online games. Playing is not a bad one, but you should stick to your limits.

Select the word or phrase from the drop-down menu to complete each sentence. File names consist of a ______ and a file extension. A file extension indicates the _______. A .bmp file extension indicates a ________ file.

Answers

Answer:

base file name, file format, bitmap image

Explanation:

File names consist of a base file name and a file extension.  A file extension indicates the file format.  A .bmp file extension indicates a bitmap image file.

What is a file?

The region where the information is collect is known as file.

The file may contain text, image, Gif, animation, audio, or video, etc.

The format of the file shows the quality of the file.

File names consist of a base file name and a file extension.

A file extension indicates the file format .

A .bmp file extension indicates a bitmap image file.

More about the file link is given below.

https://brainly.com/question/4461652

#SPJ2

What stops the current loop and resumes execution at the next statement?
the break statement

the final statement

the pass statement

the infinite-loop statement

Answers

Answer:

break statement:))

Explanation:

The statement that stops the current loop and resumes execution at the next statement is known as the break statement. Thus, the correct option for this question is A.

What is the break statement?

The break statement may be defined as a type statement that effectively terminates the execution of the nearest enclosing do, for, switch, or while statement in which it considerably appears.

While performing the break statement control passes to this statement and follows the termination of the break statement very efficiently. The purpose of the break statement is to break or terminate a loop function as early as possible.  

Therefore, the break statement is the statement that stops the current loop and resumes execution at the next statement. Thus, the correct option for this question is A.

To learn more about Break statements, refer to the link:

https://brainly.com/question/14548592

#SPJ2

Put the following numbers in order from greatest to least: 15 0 -11 45 -37.
A. 45,15,0,-11 -37
B. 45, -37, 15, -11, 0
C. -11, -37, 0, 15, 45
D.45, 15, 0, -37, -11​

PLEASE HELP ME I NEED TO DO IT NOW

Answers

Answer:

A

Explanation:

The smallest number is -37 and the largest is 45

Option A, 45 is the largest number in the group. And -37 is the smallest. The other numbers in Option A are in the correct order.
Other Questions
Which of the following is the correct term for a severe gluten intolerance? Anemia Celiac disease Eczema Hypochondria need help please Thank you!!! i need help on this home work What is the area of the figure?96 ft 284 ft 240ft 2cant be determined The house of representatives shall be composed of members chosen by the people every two years what type of principle id this What is the inheritance pattern this pedigree is representing?Autosomal DominantAutosomal RecessiveSex-linked recessiveSex-linked dominant What are the different layers of the Earth, and how do they interact? Marvin had the following transactions: Salary $50,000 Interest on City of Chicago bonds $250 Bank loan (proceed to buy personal auto) $10,000 Alimony payment to ex-wife (Divorce was finalized in 2018) $12,000 Child support payment $6,000 Gift received from aunt $20,000 Marvin's AGI is: A. $32,000 B. $38,000 C. $44,000 D. $56,000 E. $64,000 Need help on homework ASAP What is the difference between a biome and a microhabitat Im so confused on number 10 A patient having a heart attack complains of left arm pain, even though there is nothing actually wrong with his arm. This isan example of _____pain Analogies HELP MEEEEEEEEEEEEEEEEEEEEEEEEE WILL MARK BRAINLIEST In an ecosystem, which of the following is NOT an abiotic factor? A. Algae B. Ice C. Fire D. Pond Water HELP PLEASE IT'S DUE IN 5 MINUTES Which element easily loses one electron to form a positive ion? (AKS 1c/DOK 1) A. Nitrogen (N) B. Bromine (Br) C. Potassium (K) D. Magnesium (Mg) FREE BRAINLIEST! if you can answer this correctly ill give you brainliest and answer some of the questions you have posted :) thank you very much!!!(50pts) Which equation has exactly one solution?7x=77 x is equal to 77x=7x7 x is equal to 7 xx+1=x+1x plus 1 is equal to x plus 1x+1=x+2 How much heat must be added to raise a sample of 100.g of water at 270K to 280K? calculate the force needed to push the ball up a 4 m ramp if the work is equal to 16 joules.