Q4
Wed Dec 28 2022 07:57:31 GMT+0000 (Coordinated Universal Time)
Saved by
@qeebza
#Q4
scores_str = input("Enter scores: ")
scores = [int(s) for s in scores_str.split()]
scores.sort()
second_smallest = float('inf')
for score in scores:
if score < second_smallest:
second_smallest = score
else:
break
print("Second smallest score =", second_smallest)
content_copyCOPY
Comments