0

So I have made a code and and the end it was supposed to give me the counter and the total number but it wont print me out the total and wont print me out the proper counter amount.

Low=0
High=0
Counter=1
Total=0
Score1=int(input("Enter your score:"))
Score2=int(input("Enter your score:"))
Score3=int(input("Enter your score:"))
Score4=int(input("Enter your score:"))
Score5=int(input("Enter your score:"))
Score6=int(input("Enter your score:"))
Score7=int(input("Enter your score:"))
Score8=int(input("Enter your score:"))
Score9=int(input("Enter your score:"))
Score10=int(input("Enter your score:"))
ScoreList=[Score1,Score2,Score3,Score4,Score5,Score6,Score7,Score8,Score9,Score10]        

High = max(ScoreList)
Low = min(ScoreList)

if Score1 and Score2 and Score3 and Score4 and Score5 and Score6 and Score7 and Score8 and Score9 and Score10 > High:
    #High = max(ScoreList)
    Counter=Counter+1  

elif Score1 and Score2 and Score3 and Score4 and Score5 and Score6 and Score7 and Score8 and Score9 and Score10 < Low:
    #Low = min(ScoreList)
    Counter=Counter+1  
    Total=Total+ScoreList
print("High Score is:",High)
print("Low Score is:",Low)
print("Total Score is:",Total)
print("Counter is:",Counter)
exit() 


if (Score1 and Score2 and Score3 and Score4 and Score5 and Score6 and Score7 and Score8 and Score9 and Score10  > 300) or (Score1 and Score2 and Score3 and Score4 and Score5 and Score6 and Score7 and Score8 and Score9 and Score10  < 0):
        print("Please enter a Number from 0 and 300 included!")            


  • `a and b > c` doesn't check that `a` and `b` are both greater than `c` – joel Nov 04 '22 at 19:10
  • What is `Counter` supposed to be? Can you list your inputs and what you expect your output to be for it? – Axe319 Nov 04 '22 at 19:11
  • Any time you find yourself using variables with sequental numbers in the names, you probably should be using a list. – Barmar Nov 04 '22 at 19:46

0 Answers0