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
JAVA
Katarina [22]

import java.util.Scanner;

public class JavaApplication83 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter Strings: ");

       String word1 = scan.nextLine();

       String word2 = scan.nextLine();

       String newWord = "";

       if (word1.length() == word2.length()){

           for (int i = 0; i < word1.length(); i++)

           {

               newWord += word1.charAt(i) +""+word2.charAt(i);

           }

       

       }

       else{

           newWord = "error";

       }

       System.out.println(newWord);

   }

   

}

I hope this helps!

4 0
2 years ago
What is the check digit for the following original product number: 140501941 ? *
Natasha_Volkova [10]

Explanation:

I think it is 7, but I could be wrong..... sorry

8 0
2 years ago
Read 2 more answers
A network administrator plugs a new pc into a switch port. the led for that port changes to solid green. what statement best des
gayaneshka [121]

The port is operational and ready to transmit packets.

<h3>What is transmission mode explain?</h3>

Transmission mode refers to the mechanism of transferring of data between two. devices connected over a network. It is also called Communication Mode. These. modes direct the direction of flow of information.

<h3>What is used to transfer data packets?</h3>

A router is a networking device that forwards data packets between computer networks. Routers perform the traffic directing functions on the Internet.

To learn more about Transmission mode, refer

brainly.com/question/18590710

#SPJ4

3 0
1 year ago
Where can buy a piece of robots for my class
PSYCHO15rus [73]
You’d be better off just searching robot parts on google
6 0
3 years ago
Which one of them are the correct answers?
Tpy6a [65]

Rapid prototyping! I am sure that is correct


6 0
3 years ago
Other questions:
  • The use of encryption and authentication protocols is the standard method of countering attempts to alter or insert transmission
    9·1 answer
  • Give one advantage and two disadvantages of using a wireless network
    8·1 answer
  • What was the attitude of the U.S. Senate towards the Treaty of Versailles, and why did they have that attitude?​
    9·1 answer
  • A commercial depicts a teenager on a skateboard vandalizing a brick wall. This is an example of:
    11·2 answers
  • Which property is assigned to a file by the operating system?
    13·1 answer
  • n physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initia
    9·1 answer
  • In the code segment below, assume that the int variable n has been properly declared and initialized. The code segment is intend
    5·1 answer
  • Write a function that accepts a positive random number as a parameter and returns the sum of the random number's digits. Write a
    10·1 answer
  • _________ can be used to provide access control, confidentiality, data origin authentication, connectionless integrity, rejectio
    12·1 answer
  • The name for the instructions you write to a computer in a program
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!