The two ways to use the help menu is by searching of the contents or searching the index.
That depends on what the actions are, and what their personality is like.
Answer:
# input the number of temperatures required, which will be 10 here, but the user can print any number.
n=input("Enter the number of temperatures you want")
# create a list which can have n temperatures since it starts from 0, the maximum is n-1, and n needs to be converted to an integer.
temp= [0,int(n)-1]
#declared a variable of float type. As its 0.0 it will be a float, if 0 then integers, and so on
s=0.0
#running a for loop n times, and hence 0 to n-1.
for i in range(0, int(n)):
temp[i]=input("Enter the temperature in degree celsius in float")
s=s + float(temp[i])
i=i+1
print("The sum of the temperatures is:{0:0.1f}", +s)
Explanation:
The question from edhesive is: You need to write a program that calls for ten temperatures and then find the sum of temperatures. The temperature should be in float, which is expected. And the program is as being mentioned in the answer section.
Answer:
float time_hourly=(time_min/60);
float speed_mph=(distance_mil/time_hourly);
Explanation:
I have taken a float variable time_hourly to convert the time given in minutes in hours.We need to divide the time in minutes by sixty since there are 60 minutes in an hour.
I have taken a float variable speed_mph to calculate the speed.Since we know the speed is distance/time and provided the distance is in miles and the time is in hours.
Answer:
Which question would you like help with?