Question: Keep getting the error: can only concatenate str ( not int ) to str print ( Total scores entered: + i ) scores
Keep getting the error: can only concatenate strnot "int" to str
printTotal scores entered: i
scores
scoresGTEListing
scoresLTListing
sum
i
scoreln
printEnter a score or negative number to exit:
scoreln intinput
while scoreln :
scoresi scoreln
sum sum scoreln
i i
printEnter a score or negative number to exit :
scoreln intinput
average sum i
scoresGTECtr
scoresLTCtr
printTotal scores entered: i
for i in rangei :
if scoresi average:
scoresGTECtr scoresGTECtr
scoresGTEListing scoresGTEListing scoresi
else:
scoresLTCtr scoresLTCtr
scoresLTListing scoresLTListing scoresi
printAverage score: average
printNumber of scores greater than or equal to the average: scoresGTECtr
printThe scores greater than or equal to the average are: scoresGTEListing
printNumber of scores less than the average: scoresLTCtr
printThe scores less than the average are: scoresLTListing
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
