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
earnstyle [38]
2 years ago
13

How to complete Assignment 4: Evens and Odds in Project STEM

Computers and Technology
1 answer:
Soloha48 [4]2 years ago
6 0

Answer:

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

odd = 0

even = 0

for i in range(1,n+1):

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

if num%2 == 0:

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

even = even + 1

else:

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

odd = odd + 1

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

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

You might be interested in
Write the definitions for three function named max. Each receives two parameters, of the same type, and returns the larger of th
GenaCL600 [577]

Answer:

The method definition to this question can be given as:

Method definition:

double max(double x, double y)  //define method with double parameter  

{

if (x>=y)    //check condition.

return x;  //return value

else

return y;     //return value

}

double max(int x, int y)    //define method with integer parameter

{

if (x>=y)    //check condition

return x;    //return value

else

return y;  //return value

}

double max(char x, char y)   //define method with char parameter

{

if (x>=y)    //check condition

return x;    //return value

else

return y;    //return value

}

Explanation:

The above method definition can be described as below:

  • In the first method definition first, we define a method that is "max()". In this method we pass two variables as a parameter that is "x and y" and the datatype of this is double. Then we use a conditional statement. In the if block we check if variable x is greater then equal to y then it will return x else it will return y.  
  • In the second method definition, we define a method that is same as the first method name but in this method, we pass two integer variable that is "x and y". Then we use a conditional statement. In the if block we check if variable x is greater then equal to y then it will return x else it will return y.
  • In the third method definition, we define a method that is same as the first and second method name but in this method, we pass two char variable that is "x and y". Then we use a conditional statement. In the if block we check if variable x is greater then equal to y then it will return x else it will return y.
8 0
3 years ago
People of brainly Just a quick warning that there is a group of people posting links with virus.
valina [46]

Answer:

Thank you, they post on EVERY. SINGLE. QUESTION.

Explanation:

They keep posting the same file every time, but they might change the file after seeing this post. Please just don't click any files!

7 0
3 years ago
Read 2 more answers
Prior to the world wide web as we know it today, the internet was chaotic, without any ____.
atroni [7]
Search engines - there was no single way to ask a question
5 0
3 years ago
What happens when the programmer tries to access an array cell whose index is greater than or equal to its logical size?
just olya [345]

Answer:

When a programmer tries to access an item in an array cell whose index is greater than or equal to the array's logical size, this data element or item is garbage. This means that currently, the item is not the part of the program's useful data. Garbage contains objects or data which will not be used by a program running on it. So the value returned could be either of the two:

  • Value would be an arbitrary or random number if it is an array of numbers. Arbitrary means that the value is not predefined or specified in advance.
  • Value returned would be null if it is an array of objects.

                                                           

 

3 0
3 years ago
Your customer, Maggie, wants to buy a gaming PC, and she specifically mentions that she wants an Intel CPU and intends to overcl
Ksenya-84 [330]

Answer:

Intel produces a series of unlocked CPU's that can be overclocked. These CPUs are from the "K" or "X" series. Example: Intel Core i9-9900K, Intel Core i9-10940X.

These are the few things that are to be kept in mind while overclocking:

-Motherboard: Motherboard should support overclocking. Example: Intel Z series, most AMD motherboards.

-Cooler: Boosting the clock speed increases the temperature. The cooler has to be upgraded to keep the temperatures low. Example: Water-cooled. Also, the heat sink has to be checked if it's working properly.

-Be ready to test your system in BIOS. Make sure the temperature, voltage, memory speed is stable for the set clock speed.

Explanation:

8 0
3 years ago
Other questions:
  • Allison needs to graph the yearly average snowfall in Alaska. She should use a:
    13·2 answers
  • Which of the following can be created when two tables contain a common field?
    14·1 answer
  • All linear programming problems have all of the following properties EXCEPT
    9·2 answers
  • (1) Output a menu of automotive services and the corresponding cost of each service. (2 pts)Ex:Davy's auto shop servicesOil chan
    9·1 answer
  • Our Client, a renowned trading company, suffered a sudden, devastating power outage that caused their server to cease functionin
    13·1 answer
  • Describe two circumstances where access services might get implemented by organizations please.​
    9·1 answer
  • The Advanced Properties sheet enables you to add which of the following?
    15·1 answer
  • To create a program in Scratch, you need to think systematically about the order of steps. This is known as
    11·1 answer
  • Select the correct text in the passage.
    12·1 answer
  • Fifteen years ago, everyone didn't have a cell phone. Anyone developing an app would not have found many users. Today, the exist
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!