Question: My code is not importing the scores 2 txt file. Can you please help? # Open the file and read the lines with open (
My code is not importing the scores txt file. Can you please help?
# Open the file and read the lines
with openscorestxt as file:
lines file.readlines
# Process lines
for line in lines:
# put in name and scores
parts line.stripsplit
name parts
scores listmapint parts:
# Calculate the average and standard deviation
avg sumscores lenscores
stddev statistics.stdevscores
# final result
scoresstr joinmapstr scores
printfnamescoresstravg:fstddev:f
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
