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]
2 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]2 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
Let's revisit our lucky_number function. We want to change it, so that instead of printing the message, it returns the message.
maksim [4K]

Answer:

Replace the first blank with:

message = "Hello " + name + ". Your lucky number is " + str(number)

Replace the second blank with:

return message

Explanation:

The first blank needs to be filled with a variable; we can make use of any variable name as long as it follows the variable naming convention.

Having said that, I decided to make use of variable name "message", without the quotes

The next blank is meant to return the variable on the previous line;

Since the variable that was used is message, the next blank will be "return message", without the quotes

3 0
3 years ago
Which of the following is the single best rule to enforce when designing complex passwords?
saw5 [17]

Answer:

B. Longer passwords

Explanation:

If the password is longer, it requires more incorrect attempts to find it, so the system could identify a potential hacker attempt. Smaller but more complex passwords could be identified by mistype or forgotten passwords.

3 0
3 years ago
Which of the following is primarily operated by a touchscreen?
LUCKY_DIMON [66]

Answer: The correct answer is Mobile device

Explanation:

A Mobile device is any portable equipment that can be easily connected to an internet. Example of mobile devices include; smart phones, palmtop, smart watch and other computer gadgets. The use of touchscreen for input or output on mobile devices can not be overemphasized. Mobile devices are handy and can be used for making work easy. As such, in order to effectively use mobile devices, touchscreen can be primarily used.

4 0
2 years ago
Organizations should communicate with system users throughout the development of the security program, letting them know that ch
Fed [463]

Answer:

Yes it is true.The organization should indeed communicate with a system user throughout the development of a security program. A corporation needs a security policy that must be developed by management at all levels, including organization and employees at the operational level. For a corporate security plan, it is essential to reduce the resistance of the expected changes and define the objective.

Explanation:

Three objectives of the security plan in an organization are:

  • Identify the sensitive system and plan
  • Create and define the strategy and control of the system.
  • Develop and implement the training programs.

Security Information is one of the essential factors in the organization.For an organization, the information should be protected.

7 0
2 years ago
PLEASE ANSWER ASAP! THANKSSSSS
tankabanditka [31]
That is hard .....……
5 0
2 years ago
Other questions:
  • Write an examples of Output device, storage devices and inputs device 10 each excluding the common ones​
    5·1 answer
  • You find that you are missing a very important file. After much searching, you have determined that it is no longer on your comp
    13·2 answers
  • Desmond must enter a long string of numbers (1 4 9 2 1 6 2 0 1 7 7 6) into an old computer every two hours or the computer will
    12·1 answer
  • WHAT SO THESE THINGS THAT I'VE HIGHLIGHTED MEAN IN MICROSOFT WORD?
    12·1 answer
  • The text defines ________________ as the obsessive use of computers, or the unauthorized access and use of networked computer sy
    14·1 answer
  • Which port must be open on your router to allow you to upload device configuration and firmware updates using trivial file trans
    13·1 answer
  • The cat store needs your help! The base class Animal has private fields animalName, and animalAge. The derived class Cat extends
    9·1 answer
  • Please please help I don’t understand
    6·1 answer
  • Which of the following is Microsoft Windows 10 virtualization technology?
    10·1 answer
  • Imagine that you are a professional white hat hacker, testing a company’s system to make sure they are ready for attacks. What m
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!