Sign In
Ask Question
Computers & Technology
Mclean
6 January, 22:14
Edhesive 6.5 code practice question 4
+5
Answers (
2
)
Brady Hampton
6 January, 22:28
0
This question is incomplete. The complete question is given below:
Write a program that asks the user to enter ten temperatures and then finds the sum. The input temperatures should allow for decimal values.
Sample Run
Enter Temperature: 27.6
Enter Temperature: 29.5
Enter Temperature: 35
Enter Temperature: 45.5
Enter Temperature: 54
Enter Temperature: 64.4
Enter Temperature: 69
Enter Temperature: 68
Enter Temperature: 61.3
Enter Temperature: 50
Sum = 504.3
Answer:
# Program in Python
sum = 0.0
for i in range (0, 10):
t = float (input ("Enter the Temperature: "))
sum = sum + t
print ("Sum: {0:0.1f}". format (sum))
Explanation:
Initialize the sum variable to hold the sum of input temperatures. Iterate from 0 to 9, Get the input and compute the sum. Print the result by formatting the sum so that value is printed with precision to single decimal place.
Comment
Complaint
Link
Romeo Burke
6 January, 23:09
0
This requires summantion of numbers through s python program, and numbers are stored in a text file.
Explanation:
def sumnumbers ():
file1 = open ("numbers1. txt","w")
i=5
while i! = 0:
num=input ("Enter number")
file1. write (num)
file1. write ("/n")
i = i - 1
file1. close ()
file=open ("numbers1. txt", "r+")
number = 0
sum1 = 0
for number in file:
sum1 = sum1 + int (number)
print (sum1)
file1. close ()
sumnumbers ()
Comment
Complaint
Link
Know the Answer?
Answer
Not Sure About the Answer?
Get an answer to your question ✅
“Edhesive 6.5 code practice question 4 ...”
in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers
You Might be Interested in
A technician runs ipconfig on a device and gets an address of 169.254.25.67. What does this IP address indicate? The default gateway is down The DHCP server is down The DNS server is down The user cannot obtain an address from a DHCP server
Answers (1)
Define organization and explain three of the characteristics of an organization. Give three examples of organizations, try to include an organization that you belong to.
Answers (1)
Int side1; int side2; / /additional vars as needed /*assume there is code here to initialize these values*/ Two polygons are said to be similar if their corresponding angles are the same or if each pair of corresponding sides has the same ratio.
Answers (1)
Which feature would you use to find an insert a synonym for an overused word
Answers (1)
Websites that group individuals and organizations into clusters or groups based on some sort are considered to be what type of networks?
Answers (1)
New Questions in Computers & Technology
Describe in your own words the difference between species, population, and community. Give examples.
Answers (1)
Wireless networks are the most difficult type of network to set up true or false
Answers (1)
Describe two measures that a school could take to ensure the security of the school network.
Answers (1)
Most panoramic photography focuses on what subject? People Animals Objects Landscapes
Answers (1)
All formulas that begin with = IF will A. change the formatting of a cell in a specific way if certain conditions are met. B. return a specific value, calculation, or message if certain conditions are met. C.
Answers (1)
Home
»
Computers & Technology
» Edhesive 6.5 code practice question 4
Sign In
Sign Up
Forgot Password?