Answer:
total = 0
for i in range(4):
bill = float(input("Enter bill for quarter " + str(i+1) + ": "))
total += bill
average = total / (4 * 3)
if average > 75:
print("Average monthly bill is $" + str(average) + ". Too much water is being used")
if 25 <= average < 75:
print("Average monthly bill is $" + str(average) + ". A typical amount of water is being used")
if average < 25:
print("Average monthly bill is $" + str(average) + ". Thank you for conserving water")
Explanation:
*The code is in Python.
Create a for loop that asks the user to enter the bill for 4 quarters and calculate the total of the bills
Calculate the average monthly bill, divide the total by 12
Check the average for the given conditions. Depending on its value print the required message along with the average monthly bill
Answer:
The program in Python is as follows:
myList = []
num = int(input())
count = 0
while num>=0:
myList.append(num)
count+=1
num = int(input())
myList.sort()
mid = int((count-1)/2)
print(myList[mid])
Explanation:
This initializes the list
myList = []
This gets the first input
num = int(input())
This initializes count to 0
count = 0
The following is repeated until the user inputs a negative number
while num>=0:
This appends the input number to the list
myList.append(num)
This increments count by 1
count+=1
This gets another input
num = int(input())
This sorts the list
myList.sort()
Assume the number of inputs is odd, the middle element is calculated as
mid = int((count-1)/2)
This prints the middle element
print(myList[mid])
<em>From the complete question. the condition that ends the loop is a negative integer input</em>
Answer:
C.) store data securely would be my choice
Hope This Helps! Have A Nice Day!!
These are the steps you would take..
click on insert at the bar on the top of the document processor (Word,Google Docs ect.) >>Click table drag as many columns and rows as you need!
I hope this helps!