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
lawyer [7]
3 years ago
11

Assignment 4: Evens and Odds

Computers and Technology
1 answer:
Anika [276]3 years ago
5 0

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

odd = 0

even = 0

i = 0

while i < 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")

   i += 1

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

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

I hope this helps!

You might be interested in
What is the purpose of the literature review section of research paper
navik [9.2K]

variation of colored sediment

5 0
3 years ago
What is the term for the instructions that tell a computer what to do
Liono4ka [1.6K]

Answer: I believe it's software.

4 0
3 years ago
6. Which hypothesis about the fate of the universe says that it will expand continuously as the galaxies drift far apart and all
zaharov [31]
A. The big bang theory
6 0
4 years ago
Polymorphism means (Points : 2) many forms
Pavel [41]

Answer:

many forms

Explanation:

Polymorphism is a construct in object oriented programming which means multiple forms.For example: Suppose I have a function which performs the add operation on two integers and another function with the same name which concatenates 2 given strings:

  • int add ( int a, int b);
  • string add ( string a , string b)

The two functions represent polymorphic forms of the add function. The function to be invoked at runtime is determined by the runtime argument type.

For example , add (2,3) will invoke int add ( int a, int b);

Similarly, add("hello","world") will invoke string add ( string a , string b);

6 0
3 years ago
Data values in a program are held in _________. a data types b names c variables d lockers
Tpy6a [65]

Answer:

Answered below

Explanation:

Data values in a program are held in variables. Variables are like containers for holding different types of data. A variable can be identified depending on the kind of data it holds. Variables can hold data types of integers, strings, arrays, lists, sets, Boolean etc. They hold unique data types and a can not hold different data types. Different rules exist for naming variables in different programming languages. A variable name should start with lowercase letters and be descriptive of the data it holds.

7 0
3 years ago
Other questions:
  • The operation of the waste spark Ignition system is being discussed. technician a says that the spark that occurs on the exhaust
    14·1 answer
  • Using Karnaugh maps, simplify the following Boolean function:
    14·1 answer
  • If you find yourself boxed in by a vehicle on your left or right _____________
    14·2 answers
  • Need help writing a program that reads a string if the option "E" (enter a string) is chosen, and checks if parentheses (), brac
    14·1 answer
  • Describe an ergonomic consideration for your body while working for long periods in front of a monitor or computer screen?
    14·1 answer
  • A network administrator wants to logically separate web servers on the network. Which of the following network device will need
    10·2 answers
  • Carbon copy others who are..
    14·2 answers
  • Did anyone else remember that Unus Annus is gone? I started crying when I remembered.... Momento Mori my friends.... Momento Mor
    9·2 answers
  • 1. What are you going to do if someone ask for your personal information online?​
    12·2 answers
  • When a computer is infected by a virus, _______.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!