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
Airida [17]
3 years ago
8

Edhesive: Assignment 4: Evens and Odds

Computers and Technology
1 answer:
solniwko [45]3 years ago
6 0

Answer:

Written in Python

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).")

Explanation:

<em>I've added the full source code as an attachment where I use comments (#) as explanation</em>

Download txt
You might be interested in
When cleaning a computer, you need only worry about what you can see.
icang [17]

Answer:

No

Explanation:

Somethimg yu cant see are important

5 0
3 years ago
Which type of network consists of multiple Windows computers that share information, but no computer on the network serves as an
Alexxandr [17]

The type of network that consists of multiple Windows computers that share information is peer-to-peer. In this network, the computer serves as an authoritative source of user information.

<h3>Peer-to-peer computer networks</h3>

A peer-to-peer (P2P) network can be defined as a type of network where the computer acts as a source of user information.

In P2P, a cluster of different computers are linked and they have the same permissions for processing data in the network.

This type of computer network (peer-to-peer computer network) has been created to serve and/or receive data.

Learn more about peer-to-peer computer networks here:

brainly.com/question/1172049

7 0
3 years ago
Questions: 1) Run the C program, attach a screenshot of the output in the answer sheet. 2) Check the address of the array and th
KiRa [710]

Answer:

Output

mumners = 0x7ffc4d2767d0

Method1: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767d4

numbers[2] = 0x7ffc4d2767d8

numbers[3] = 0x7ffc4d2767dc

numbers[4] = 0x7ffc4d2767e0

Method2: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767e4

numbers[2] = 0x7ffc4d2767f8

numbers[3] = 0x7ffc4d27680c

numbers[4] = 0x7ffc4d276820

sizeof(numbers) = 20

2.

mumners = 0x7ffc4d2767d0

Method1: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

Yes both are same since address of the array is the address of its first element

3.

Method1: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767d4

numbers[2] = 0x7ffc4d2767d8

numbers[3] = 0x7ffc4d2767dc

numbers[4] = 0x7ffc4d2767e0

Method2: Address of array Elements

numbers[0] = 0x7ffc4d2767d0

numbers[1] = 0x7ffc4d2767e4

numbers[2] = 0x7ffc4d2767f8

numbers[3] = 0x7ffc4d27680c

numbers[4] = 0x7ffc4d276820

Address printed using Method1 and Method2 are same since name of the array itself a pointer and adding 1 to it gives second element address and 2 to it gives third element and so on similarly applying address operator over the array elements provides the direct address of the element.

4.

printf("Length(numbers) = %lu\n",sizeof(numbers)/sizeof(numbers[0]));

Dividing an size of array by size of individual array elements gives length of an array

Length(numbers) = 5

5.

Yes even if numbers are passed to a function sizeof can be applied since numbers is starting address of an array and to pass an array as argument its address passed.

5 0
3 years ago
Hey can someone help?
Zinaida [17]
Send an email to it!
4 0
3 years ago
Read 2 more answers
Explain how creating a model provides a practical solution for some scientific research.
ivann1987 [24]
Creating a model provides a practical solution for some scientific research by showing systems that are very large,small,or complex.Models are simplified representations of real objects or systems.Models can make things easier to study by zooming in on a single piece of a large system or magnifying something that is too tiny to see with the naked eye.
6 0
4 years ago
Read 2 more answers
Other questions:
  • Given three dictionaries, associated with the variables, canadian_capitals, mexican_capitals, and us_capitals, that map province
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    14·1 answer
  • In Java, a char variable is capable of storing any Unicode character. Write a statement that assigns the Greek letter ^ to a cha
    7·1 answer
  • Have you ever had an incorrect perception about someone else?
    6·1 answer
  • Which of these statements best compares P waves and S waves of an earthquake?
    5·1 answer
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
  • What will the following program display in the console?
    12·1 answer
  • Please explain what is Ribbon?  give examples​
    7·2 answers
  • You have been asked to replace a cracked screen on a laptop. The replacement screen was delivered today, but it did not include
    7·1 answer
  • where should a user disable virus protection settings that might prevent the boot area of the hard drive from being altered? a.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!