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
Archy [21]
3 years ago
10

Write a program that prints the sum of the even numbers and the products of odd numbers on the screen

Computers and Technology
1 answer:
ss7ja [257]3 years ago
4 0

Answer:

The program in Python is as follows:

n = int(input("Number of inputs: "))

total = 0; product = 1

for i in range(n):

   num = int(input(": "))

   if num%2 == 0:

       total+=num

   else:

       product*=num

print("Sum of even: ",total)

print("Product of odd: ",product)

Explanation:

This prompts the user for the number of inputs, n

n = int(input("Number of inputs: "))

This initializes sum (total) to 0 and products to 1

total = 0; product = 1

This iterates through n

for i in range(n):

This gets the inputs

   num = int(input(": "))

If input is even, calculate the sum

<em>    if num%2 == 0:</em>

<em>        total+=num</em>

If otherwise, calculate the product

<em>    else:</em>

<em>        product*=num</em>

Print the required outputs

<em>print("Sum of even: ",total)</em>

<em>print("Product of odd: ",product)</em>

<em />

You might be interested in
Type the correct answer in the blank. Spell all words correctly.
Mademuasel [1]

Answer:

Database

Explanation:

Once you make a change to the database it will offset the program, which will change your slides.

8 0
3 years ago
Your primary responsibility as a systems analyst concerns:_____.
Leni [432]

Main Answer:

Your primary responsibility as a system analyst concerns :b.people

Sub heading:

what does a system analyst do?

Explanation:

1. A System analyst is responsible for monitoring the effectiveness of technology systems and analysing it's efficiency for business operation and clients'needs.

2.system analyst create specific modifications

Reference Link:

https\\brainly.com

Hashtag:#SPJ4

7 0
2 years ago
I'm very confused about this, I am seeing multiple different answers and I thought the answer was obvious, but guess not.
BabaBlast [244]
I NEED POINTSSS if you understand I just don’t know the answer sorry
6 0
3 years ago
Read 2 more answers
You are troubleshooting a laptop with multiple sticking keys that result in misspelled words while the user types. Other than se
Tasya [4]

Explanation:

Interesting problem that can happen to coffee drinkers and slush lovers.

Most of the time, multiple sticking keys simultaneously appearing infer a recent (3 days to a week) spill of a sugary liquid on the keyboard.

If it is a built in laptop keyboard, read no further, confide in a repair shop because keys are not easy to open, and harder to put back.

If it is a USB (or PS2) keyboard, AND you are handy, AND you can lift the key tops (and put them back), you can detach keyboard from computer, then after removing key tops of the sticky keys, try cleaning with warm (to better disolve the sugar) water with a non-dripping cotton tip and dry with cotton swaps.  Let dry for the next few days before plugging in again.  Do NOT use solvents, and definitely NOT "contact cleaners".

The safest and suggested option is to replace the (detachable) keyboard with a compatible or similar one.  If PS2 keyboards are hard to find, there are converter cables that plug into the PS2 sockets of the computer, and accept USB input  (and reverse cables).

5 0
3 years ago
What should you do if a dialog box covers an area of the screen that you need to see?
KatRina [158]

Hm ok, so a dialog box is in the way it may just be as simple as zooming out if it is on a internet browser. The first picture below shows you how to do it on chrome,and the second picture on how to on Mozilla Firefox.

Both of these areas are found in the upper right corner of your internet browser, but <u>if I didn't answer this question the way you need it answered let me know!</u> I can edit and revise for whatever device or system you need me to, for a short period of time before the question locks.

Thanks!

5 0
4 years ago
Read 2 more answers
Other questions:
  • How do i stream from my chromebook to my tv?
    8·1 answer
  • The efficiency of a screw is low because of _____. width friction length height
    10·2 answers
  • Using the drop-down menu, complete the following questions based on your knowledge of variables. is a value that can be used onl
    7·1 answer
  • Which of the following STEM discoverers invented an application that uses summarization technology? Fedkiw Hawking D’Aloisio Gat
    7·1 answer
  • 20. When you see ##### in a cell, you should
    8·1 answer
  • PHP server scripts are surrounded by delimiters, which? *
    5·1 answer
  • A company is deploying NAFDs in its office to improve employee productivity when dealing with paperwork. Which of the following
    11·1 answer
  • Complete the sentence.
    8·2 answers
  • Which of these is not enumerated as a motivation to create accessible web content?
    10·1 answer
  • What is the term for delivering an application over the internet called?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!