Question: # Python Please help me convert the input values to float values Code works, but the values printed need to be floats like 77.0 etc.

# Python Please help me convert the input values to float values Code works, but the values printed need to be floats like 77.0 etc. j_list = [] k_list = [] c_list = [] # Enter scores for Jean print("Please enter Jean's scores one by one. ") for i in range(4): j_list.append(eval(input())) print("Jeans scores:", j_list) # Enter scores for Kayla print("Please enter Kayla's scores one by one. ") for i in range(4): k_list.append(eval(input())) print("Kayla scores: ", k_list) # Enter scores for Connie print("Please enter Connie's scores one by one. ") for i in range(4): c_list.append(eval(input())) print("Connie scores: ", c_list) # merging everything to a single list

all_scores = [j_list, k_list, c_list] print("All scores", all_scores) # adding one to the scores of each skaters using nested list

for i in range(len(all_scores)): #loop for iterating through the main list for j in range(len(all_scores[i])): #loop for iterating through the sub list all_scores[i][j] += 1# adding 1 to scores print("All scores after extra point:", all_scores) # now we will sort the values in the same way as previous

for i in all_scores: i.sort() print("Scores after sorting:", all_scores) print(all_scores)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!