Home > other >  Small white for python
Small white for python

Time:09-26

How can I use a for loop to the Numbers in the list?
For example,
IScore=,65,84,67 [86]
SunScore=0
For I in iScore sumScore +=iScore
Print (sumScore)
Why has revealed a list and int sumScore two types?
Thank you for your bosses

CodePudding user response:

 
IScore=,65,84,67 [86]
SumScore=0
For I in iScore:
SumScore +=I
Print (sumScore)

CodePudding user response:

English letters are wrong, do it a beginner

CodePudding user response:

 
List1=list (I for I in range (1, 25))
Sum1=0
For I in list1:
Sum1=sum1 + I
The else:
Print (' list list1 of each element and is: {} '. The format (sum1))

CodePudding user response:

Sumscore=0, is M, not N

CodePudding user response:

 iScore=,65,84,67 [86] 
SumScore=0
For I in iScore:
SumScore +=I
Print (sumScore)

The second row sumscore spelling mistake, the fourth row +=I, not iscore
  • Related