answer.
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
harkovskaia [24]
1 year ago
6

This program finds the sum and average of three numbers. What are the proper codes for Lines a and b?

Computers and Technology
2 answers:
o-na [289]1 year ago
8 0

Answer:

The codes in line A and line B are given below:

average=sum divided by 3

Explanation:

Gennadij [26K]1 year ago
4 0

Answer:

The Proper codes in Line a and Line b is given below

average=Sum/3  

print (" Average is = ", average)

Explanation:

In the given question it calculated the sum but the program does not calculate the average of the 3 numbers.The average of the 3 number is calculated by using average=Sum/3   statement so we add this code in Line a then After that print the value of average by using the print function so we add this code in Line b.

You might be interested in
Use the loop invariant (I) to show that the code below correctly computes the product of all elements in an array A of n integer
NeTakaya

Answer:

Given Loop Variant P = a[0], a[1] ... a[i]

It is product of n terms in array

Explanation:

The Basic Step: i = 0, loop invariant p=a[0], it is true because of 'p' initialized as a[0].

Induction Step: Assume that for i = n - 3, loop invariant p is product of a[0], a[1], a[2] .... a[n - 3].

So, after that multiply a[n - 2] with p, i.e P = a[0], a[1], a[2] .... a[n - 3].a[n - 2].

After execution of while loop, loop variant p becomes: P = a[0], a[1], a[2] .... a[n -3].a[n -2].

for the case i = n-2, invariant p is product of a[0], a[1], a[2] .... a[n-3].a[n-2]. It is the product of (n-1) terms. In while loop, incrementing the value of i, so i=n-1

And multiply a[n-1] with p, i.e P = a[0].a[1].a[2].... a[n-2].

a[n-1]. i.e. P=P.a[n-1]

By the assumption for i=n-3 loop invariant is true, therefore for i=n-2 also it is true.

By induction method proved that for all n > = 1 Code will return product of n array elements.

While loop check the condition i < n - 1. therefore the conditional statement is n - i > 1

If i = n , n - i = 0 , it will violate condition of while loop, so, the while loop will terminate at i = n at this time loop invariant P = a[0].a[1].a[2]....a[n-2].a[n-1]

6 0
2 years ago
Two blue armies are each poised on opposite hills preparing to attack a single red army in the valley. The red army can defeat e
labwork [276]

Answer:

I would attack with one blue army and while all the chaos I would send the foot soldier to the second blue army and tell them to attack with the first. Idk like if the foot soldier is the only way of communication, so yeah

6 0
2 years ago
Read 2 more answers
Analiza las relaciones y diferencias que encuentras entre las actitudes y los
Anarel [89]

Answer:Technology is the sum of techniques, skills, methods, and processes used in the production of goods or services or in the accomplishment of objectives, such as scientific investigation. Technology can be the knowledge of techniques, processes, and the like, or it ... An articulation of this philosophy could be found explicitly in Vannevar Bush's

4 0
1 year ago
Read 2 more answers
How would you categorize the software that runs on mobile devices? Break down these apps into at least three basic categories an
I am Lyosha [343]

Mobile software is an App that can be downloaded to a mobile device and used to execute specific tasks. Once the app is initiated, it runs inside the operating system until it is been closed by the user. These are small, individual software units which can work as a browser, game, shopping app, calculator and more.


There are mainly 3 types of mobile apps:

Native applications, Hybrid applications, and Web applications.


Native Applications:

Native applications are developed to be used on a particular platform or device. They exist on the device and are accessed through icons on the device. Native apps are written for specific Operating System, which means a separate source code is written for each OS, such as iOS, Android, Linux, and Windows, this means, a native Android software will not work on a windows platform, because the Windows platform does not have the source code to operate the software, however, the advantages of native applications is that they can take the full advantage all features in the devices’


Web Application:

Web application (Web app) is a client-server software application, in which the client runs in a web browser. It is stored on a remote server and delivered over the Internet through a browser interface. It is not designed for a specific type of device or an operating system, which means it can be accessed from several devices. Web applications commonly use a combination of server-side script (ASP, PHP, etc) and client-side script (HTML, Javascript, etc.) to be developed.


Hybrid Applications:

Hybrid applications have the characteristic of both web applications and native applications. They combine the elements of both native and Web applications. They are developed using HTML, CSS, and Javascript, and then wrapped into a native application using platforms like Cordova. Since they are designed for various platforms, they don’t require different source codes like native apps, Web application development is obviously faster, simpler and rapid.

5 0
2 years ago
Read 2 more answers
Which of the following situations is most likely to cause issues arising from the digital divide?
IrinaK [193]

Answer:

A

Explanation:

I saw it on another website and got it right

7 0
1 year ago
Other questions:
  • Write the definition of a function dashedline, with one parameter , an int . if the parameter is negative or zero, the function
    15·1 answer
  • Which presenter would most likely benefit from a custom slide show?
    10·2 answers
  • Which command suppresses the visibility of a particular Row or column in a worksheet?
    9·1 answer
  • ___________ is an approach to boundary spanning that results from using sophisticated software to search through large amounts o
    8·1 answer
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • A program needs to allow a customer to input integers until the input number is zero. When the input number is zero, the program
    14·1 answer
  • There are two methods of enforcing the rule that only one device can transmit. In the centralized method, one station is in cont
    5·1 answer
  • The PictureBook class is a subclass of the Book class that has one additional attribute: a String variable named illustrator tha
    9·1 answer
  • Which are types of lines? Choose three answers.
    9·1 answer
  • A regional bank implemented an automated solution to streamline their operations for receiving and processing checks/cheques. Th
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!