Write a short program that takes a user-inputted integers repeatedly until the user enters 0, After the user enters 0, display the minimum, maximum, and average of the user-inputted numbers.
To write this program, you must use a loop to use the most functionality. It also would be most functional to store the user-inputted values in a list, for printing out max, min, and avg after the loop is done. The program should look like so, with n being the list of user-inputted integers and i being the most current user inputted number. We can use the min and max functions to get the minimum and maximum. To get the average, we can sum the values in the n and divide by the number of values in n. The program is as follows: n=  i= None while i != 0: i=int(input('Enter a value (O to end): ')) n.append(i) if i==0: n.pop() print('Min: ',min(n)) print('Max: ',max(n)) print("Avg: ",round((sum(n)/len(n)),1))
If (x-1)/5 is k, and k is 5, what is the value of x?
If (x-1)/5 equals k, and k equals 5, then (x-1)/5 equals 5. To solve for x, you can multiply both sides by 5 to get rid of the denominator, and have (x-1) = 25. x=26.
Find the distance between (0,-5) and (-1,4)
To find the distance between two points, you use the distance formula which is: sqrt( (x2-x1)^2 + (y2-y1)^2)). (x2-x1)^2 is (-1-0)^2, or -1^2 which is 1, and (y2-y1)^1 is (4-9)^2, or (-5)^2, which is 25. the square root of 1+25 is sqrt(26), or approx. 5.099