Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is Brazils strategy?

Answered: 1 week ago

Question

9. Describe the characteristics of power.

Answered: 1 week ago

Question

10. Describe the relationship between communication and power.

Answered: 1 week ago