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
vfiekz [6]
3 years ago
6

Part 1 Given 3 integers, output their average and their product, using integer arithmetic. Ex: If the input is 10 20 5, the outp

ut is: 11 1000 Note: Integer division discards the fraction. Hence the average of 10 20 5 is output as 11, not 11.666666666666666. Submit the above for grading. Your program will fail the test cases (which is expected), until you complete part 2 below but check that you are getting the correct average and product using integer division. Part 2 Also output the average and product, using floating-point arithmetic. Ex: If the input is 10 20 5, the output is: 11 1000 11.666666666666666 1000.0
Computers and Technology
1 answer:
MaRussiya [10]3 years ago
6 0

Answer:

a = int(input("Enter first number: "))

b = int(input("Enter second number: "))

c = int(input("Enter third number: "))

avg = (a + b + c) / 3

product = a * b * c

print(str(int(avg)) + " " + str(product))

print(str(avg) + " {:.1f}".format(product))

Explanation:

*The code is in Python

Ask the user for three integers, a, b, and c

Calculate their average, sum the numbers and divide by 3

Calculate their product

Print avg and product as integer numbers, be aware that I type casted the avg to int

Print avg and product as floating point numbers, be aware that I used format method to print one decimal for product

You might be interested in
When comparison shopping, all of these hint at a good deal EXCEPT_____________________.
pav-90 [236]

Answer:

lower-priced models offer more features

Explanation:

4 0
3 years ago
ACL 1 has three statements, in the following order, with address and wildcard mask values as follows: 1.0.0.0 0.255.255.255, 1.1
larisa86 [58]

If a router tried to match a packet sourced from IP address 1.1.1.1 using this ACL, the first statement will be used.

a. First

<u>Explanation:</u>

We use ACL technology to make basic security level in the network.  ACL is strictly used to update the routing in the network and make sure network pears and make sure the flow control for network traffic is followed.

Since it is routing ip address through ACL statement. It all depends on how the network engineer routed the traffic in the network. A packet with source IP address 1.1.1.1 would match any of the three explicitly configured commands described in the question. As a result, the first statement will be used.

The router searches the ACL statement by order and when the match is found it stops execution of the ACL statement that will match with the first occurrence.

7 0
3 years ago
In database software, which option is the most appropriate menu choice or command to use if you want to change the format of the
sleet_krkn [62]

Answer:

I think it's d

Explanation:

             

4 0
3 years ago
Write a program that has a user guess a secret number between 1 and 10. Store the secret number in a variable called secretNumbe
Tom [10]

Answer:

Explanation:

The following code is written in Python. It is a function called guessMyNumber and like requested creates a random number and saves it to secretNumber. Then it continuously asks the user for their guess and compares it to the secret number. If the guess is correct it exits the loop otherwise it will continue to ask for a new guess.

import random

def guessMyNumber():

   secretNumber = random.randint(1, 10)

   print(secretNumber)

   while True:

       guess = input("Enter your guess: ")

       guess = int(guess)

       if (guess == secretNumber):

           print("Congratulations you guessed correctly")

5 0
3 years ago
Which soft skill involves the ability to produce ideas that will give an organization an advantage with respect to other organiz
KiRa [710]

B.  Strategic thinking

<u>Explanation:</u>

Strategic thinking helps to come up with great ideas that makes the company  better than the other company. One can apply strategic thinking to arrive at decisions that can be related to your work or personal life. Strategic thinking involves developing an entire set of critical skills. Strategic thinking enables a business owner to determine how to use these resources most effectively and advance the company toward its objectives. Strategic thinking focuses the management team on markets that are most likely to succeed.

5 0
3 years ago
Other questions:
  • By Definition, a Small Business?
    9·1 answer
  • Which of the following are examples of how a company might use consumer data it had collected? a To decide what types of product
    10·1 answer
  • Define Class in C++. Briefly discuss.
    9·1 answer
  • You are adding a new 500 GB hard drive to your computer. The hard drive must be formatted with a file system to organize files i
    8·1 answer
  • What is a slide master ?
    8·2 answers
  • GuardIN is an IT security firm. It deals with highly secure data for a wide variety of software and e-commerce agreements, trade
    7·1 answer
  • What happens when a dataset includes records with missing data?
    9·1 answer
  • NEED HELP FAST timed
    13·1 answer
  • A popular photo editing application provides customers with the option of accessing a web based version through a monthly subscr
    11·1 answer
  • Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the cou
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!