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
Computer World sells laptops separately from accessory products like docking stations, anti-virus software, and external hard dr
uysha [10]

Answer:

Optional product pricing

Explanation:

<em>Optional product pricing</em> occurs when a product is sold for a much lower price but complementary products or accessories are sold separately to generate profit.

A typical example is in the printer category, printer cartridges are sold separately from the printer when the one in the newly purchased printer runs out. The customer is forced to purchase new cartridges that the company benefits from as profits.

Optional product pricing is a strategy to provide less expensive technology while exploiting the frequent use of accessories to make a substantial profit.

6 0
3 years ago
Describe the pace of change in ICT
densk [106]

Answer:

Information and communications technology is an extensional term for information technology that stresses the role of unified communications and the integration of telecommunications and computers, as Technology Trends 2016

#1: Spreading intelligence throughout the cloud. ...

#2: Self-managing devices. ...

#3: Communication beyond sight and sound. ...

#4: Fundamental technologies reshaping what networks can do. ...

#5: Weaving security and privacy into the IoT fabric.

Explanation:

look for a question that i have answered answer it and also plz give me brainliest on this one plz

4 0
3 years ago
Can I have help on this
never [62]

the answer is the seconf one


6 0
3 years ago
Read 2 more answers
Low-end CRM systems are designed for companies like Boeing because they only have a few, large customers.
Arlecino [84]

Answer: False

Explanation:Low-end CRM system are specifically designed for those companies which are small scale but can connect to many businesses or organization at a time. These are the customer relationship management system that happens to analyze the functioning of the business with high count of small companies with appropriate amount of customers.Thus, the statement given is false.

6 0
2 years ago
Write a method called findNames that meets the following specs: It takes two arguments: a list of strings, allNames, and a strin
Anna11 [10]

Answer:

public class Solution {

   public static void main(String args[]) {

       String[] allNames = new String[]{"Bob Smith", "Elroy Jetson", "Christina Johnson", "Rachael Baker", "cHRis", "Chris Conly"};

       String searchString = "cHRis";

       

       findNames(allNames, searchString);

   }

   

   public static void findNames(String[] listOfName, String nameToFind){

       ArrayList<String> resultName = new ArrayList<String>();

       

       for(String name : listOfName){

           if (name.toLowerCase().contains(nameToFind.toLowerCase())){

               resultName.add(name);

           }

       }

       

       for(String result : resultName){

           System.out.println(result);

       }

   }

}

Explanation:

The class was created called Solution. The second line define the main function. Inside the main function; we initialized and assign an array called allNames to hold the list of all name. Then a String called searchString was also defined. The searchString is the string to search for in each element of allNames array. The two variables (allNames and searchString) are passed as argument to the findNames method when it is called.

The method findNames is defined and it accept two parameters, an array containing list of names and the name to search for.

Inside the findNames method, we initialized and assigned an ArrayList called resultName. The resultName variable is to hold list of element found that contain the searchString.

The first for-loop goes through the elements in the allNames array and compare it with the searchString. If any element is found containing the searchString; it is added to the resultName variable.

The second for-loop goes through the elements of the resultName array and output it. The output is empty if no element was found added to the resultName variable.

During comparison, the both string were converted to lower case before the comparison because same lowercase character does not equal same uppercase character. For instance 'A' is not same as 'a'.

8 0
2 years ago
Other questions:
  • Why are open standards important in the data communications industry?
    5·1 answer
  • Lucinda works at a recycling center. She noticed an increase in glass recyclables entering the center. She collects data regardi
    7·2 answers
  • You are working as a Solutions Architect for a technology company which is in the process of migrating their applications to AWS
    15·1 answer
  • Why is it important to have user accounts? describe the purpose, features and functions of user accounts (including administrato
    5·1 answer
  • If Asa changes the text to bold, he has changed the style. True False
    8·2 answers
  • Write a program that will read two floating point numbers (the first read into a variable called first and the second read into
    13·1 answer
  • Whats the formatting of a letter to the editor?​
    12·1 answer
  • Assume the user types in 7 for x and 2 for y. What is output by the
    6·1 answer
  • You use lpstat and determine that a user named User1 has placed two large print jobs in the queue for Printer1 that have yet to
    9·1 answer
  • Frankie used the ps command to find the process id of an application that he needs to stop. What command-line tool should he use
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!