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
MAXImum [283]
3 years ago
11

Write a program that accepts three decimal numbers as input and outputs their sum​

Computers and Technology
2 answers:
Natali [406]3 years ago
7 0

Answer:

a = float(input("Enter an integer: "))

b = float(input("Enter an integer: "))

c = float(input("Enter an integer: "))

print (a + b + c)

Explanation:

Takes three numbers that user inputs and outputs their sum (of whatever numbers are given.)

Alex73 [517]3 years ago
4 0

Answer:

sum = 0.0

for i in range(0,3):

   sum += float(input("Enter a decimal number to sum: "))

print ("Sum: ", sum)

*** Sample Input ***

Enter a decimal number to sum: 1.1

Enter a decimal number to sum: 2.2

Enter a decimal number to sum: 3.3

*** Sample Output ***

Sum:  6.6

Explanation:

For this problem, a method was devised in python to create the sum of three individual decimal numbers.

The first line of code, <em>sum = 0.0</em>, initializes a variable to the float type in which we will store the value of our sum.  Note, it is initialized to 0.0 to start from a value of 0 and be considered a float.

The second line of code, <em>for i in range(0,3):</em>  is the creation of a for loop control structure.  This will allow us to repeat a process 3 amount of times using the iterator i, from value 0 to 3 in this case.  Note, 0 is inclusive and 3 is exclusive in the python range.  This means the for loop will iterate with, i=0, i=1, and i=2.

The third line of code, <em>sum += float(input("Enter a decimal number to sum: "))</em>  is simply asking the user for a number, taking that input and converting it from a string into a float, and then summing the value with the previous value of sum and saving that into sum.

The fourth line of code, <em>print ("Sum: ", sum)</em> is simply displaying the final value that was calculated by adding the three user inputs together which were stored into the variable <em>sum</em>.

Cheers.

You might be interested in
A group of small local businesses have joined together to share access to a cloud-based payment system. Which type of cloud is m
Valentin [98]

The type of cloud that is most likely being implemented when a group of small local businesses has joined together to share access is community cloud service. The correct option is C.

<h3>What is cloud service?</h3>

Cloud services have a wide variety of services for companies and businesses. They provide applications and software with resources. They provide easy and affordable services.

Community cloud service is a shared type of cloud service that helps banks and heads of trading firms.

Thus, the correct option is C. Community.

To learn more about cloud service, refer to the below link:

brainly.com/question/24227961

#SPJ1

The question is incomplete. Your most probably complete question is given below:

Public

Private

Community

Hybrid

6 0
2 years ago
Which term is used to describe a public-key, cryptography-based mechanism for proving the source (and possibly integrity) of a d
Olegator [25]

The question below has multiple answers

<span>a)      </span>Trusted third party

<span> <span>b)      </span>Symmetric Cryptography <span> <span>c)       </span>Algorithm <span> <span>d)      </span>Digital signature The answer is (D) Digital Signature It uses the private key of a sender and is a mathematical technique that validates the integrity and authenticity through a public key encryption of a digital or a software document. It is normally attached to digital or a software document to verify the sender’s identity and its content. </span></span></span>




5 0
3 years ago
Read 2 more answers
Type the correct answer in each box. Spell all words correctly.
LUCKY_DIMON [66]

Answer:

View or Remove/Take.

Explanation:

State police are not allowed to view your data without a search warrant.

5 0
3 years ago
The google android mobile operating system is a proprietary system, for use on only approved devices.​
balandron [24]
I would choose b. False
7 0
3 years ago
A palindrome is a string that reads the same both forward and backward. For example, the string madam is a palindrome. Write a p
miskamm [114]

Answer:

Explanation: Hey bro! Sorry to bother. But have any of your questions got deleted after posting them? I don't know why my question got deleted by a guy.

8 0
3 years ago
Other questions:
  • Complete the function ConvertToFeetAndInches to convert totalInches to feet and inches. Return feet and inches using the HeightF
    5·1 answer
  • Write a program to output the following quote by Edsger W. Dijkstra: "Computer Science is no more about computers than astronomy
    9·2 answers
  • User-system interaction is?
    11·1 answer
  • Dr. Robbins wants to know if there are different opinions regarding the value of public school education between Native American
    11·1 answer
  • MARKETING HELP PLEASE?!?!?
    15·1 answer
  • /*
    8·1 answer
  • You are a network administrator for a company that has two buildings. You are setting up a wireless network so users can maintai
    8·1 answer
  • Select the correct answer from the drop-down menu.
    15·2 answers
  • Who is the founded the java computer language?​
    5·1 answer
  • Who is maintain data and time of computer?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!