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
crimeas [40]
2 years ago
7

Edhesive 6.5 code practice question 4

Computers and Technology
2 answers:
Tom [10]2 years ago
8 0

Answer:

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()

Jlenok [28]2 years ago
4 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 .
You might be interested in
What is retrieved from a search containing two terms separated<br> by the AND operator?
egoroff_w [7]

Answer:

A AND B= 1 or 0

1 1  1

0 1  0

1 0  0

0 0 0

So, as explained above if both are 1 we then only get 1, or else we get 0 always in case of AND which is a logical operator, whose output can be 0 or 1 only. This is being depicted above.

Explanation:

If both are 1 we get 1 or always else, we get the output =0.

8 0
2 years ago
Your friends credit scores are 560, 675, 710, 590, and 640. Your credit score is 680. What is the difference between the average
Wittaler [7]

Answer:

560+675+710+590+640=3175/5=635

so your credit score is 45 credits better than the average of your friends

Explanation:

3 0
2 years ago
What best describes the purpose of the Recycle Bin (Microsoft Windows) and Trash (Apple Mac) features
alexandr1967 [171]
Its to delete the files from the computer that you no longer want. Once its put in the recycling bin it stays there, then when you empty it, its off your computer and there is no way you can get those files back. This can also free-up some space from your computer since mega and giga bites are being removed from your computer.
7 0
2 years ago
Read 2 more answers
Which type of wireless technology bounces transmissions off walls and ceilings to deliver signals from sender to receiver and is
Alenkinab [10]
Scatter infrared. Hope this helps! <span />
7 0
2 years ago
You recently created several new user accounts in the Sales OU and configured them with the appropriate group membership, logon
Andru [333]

Answer:

d. Disable the account until the employee is ready to use it.

Explanation:

Inactive accounts usually presents vulnerability as they are readily compromised and act as targets for attacks by hackers or aggrieved ex-employees that were fired. Such accounts can be used to attack the system without anyone knowing or reporting suspected foul play since there's no one attached.

Since the user will be using the account in two weeks the best practice will be to disable the account until the employee is ready to use it.

8 0
2 years ago
Read 2 more answers
Other questions:
  • The ________ program displays graphics and loading screens during the boot process.
    8·1 answer
  • While researching ideas for cutting energy costs is his company. Hector watches an online video in which a business expert says,
    6·2 answers
  • Lance is at a bus station. His friend is using the ATM machine to withdraw some money. Lance notices a stranger deceptively watc
    6·2 answers
  • The spreadsheet below shows the names years in office, and number of terms for five US presidents
    7·2 answers
  • Initialize the list short_names with strings 'Gus', 'Bob', and 'Zoe'. Sample output for the givenprogram:Gus Bob Zoeshort_names
    13·1 answer
  • Consider the following method intended to modify the parameter names by removing all instances of the String n.
    14·1 answer
  • Define a structure type auto_t to represent an automobile. Include components for the make and model (strings), the odometer rea
    13·1 answer
  • Create a stored procedure named prc_inv_amounts to update the INV_SUBTOTAL, INV_TAX, and INV_TOTAL. The procedure takes the invo
    8·1 answer
  • How to code 2.9.5: Four colored triangles {Code HS}
    10·1 answer
  • On the Direct Marketing worksheet, create appropriate range names for Design Fee (cell B8), Cost Per Ad (cell B9), Total Clicks
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!