school

thing1's amazing school repo
Log | Files | Refs | Submodules | README

results.py (504B)


      1 results = []
      2 
      3 more = "yes"
      4 
      5 while more.lower() == "yes":
      6     result = 0
      7     tmp = []
      8     while True:
      9         result = int(input("result: "))
     10         if result == -1:
     11             break
     12         if result < 0:
     13             print("invalid input")
     14         elif result > 100:
     15             print("invalid input")
     16         else:
     17             tmp.append(result)
     18     results.append(tmp)
     19     more = input("add results for another student? ")
     20 
     21 for i in range(len(results)):
     22     print("student",i+1,"got: ", *results[i])