File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Students/Hui Zhang/session03 Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,16 @@ def sendletter(Userlist, input1):
66 username1 = raw_input ("Please type a name from above existing Donator List or enter a new name: " )
77 # Verify if input are all digis.
88 amount1 = raw_input ("Please input the amount of your donation: " )
9+ # Determine if your input is digi.
910 while not amount1 .isdigit ():
10- print ( "Error, your input is not a number!!! " )
11- amount1 = input ("Please input the amount of your donation: " )
12- # Determine if just typed in donator name is actually in the list.
11+ print "Error, your input is not a number!!!"
12+ amount1 = raw_input ("Please input the amount of your donation: " )
13+ # Determine if the donator name just typed in is actually in the list.
1314 # If it is in the list, then do the below:
1415 if username1 in Userlist :
1516 locationuser1 = Userlist .index (username1 )
1617 Userlist [locationuser1 + 1 ].append (int (amount1 ))
17- # If it is not in the list, then add it in the list.
18+ # If it is not in the list, then append it in the list.
1819 else :
1920 Userlist .append (username1 )
2021 Userlist .append ([int (amount1 )])
You can’t perform that action at this time.
0 commit comments