Code:
a=raw_input('Enter the number of course you are taking: ')
b=int(a)
c=range(b)
if int(a) <= 0:
print ('Error: You must have at least one class!')
d=('Enter the course *NAME*, *CREDITS*, and *GRADE*: ')
#
for i in range(b):
locals()["k"+str(i)]=locals()["y"+str(i)]=raw_input(d)
What i need to do:
*be able to extract the grade and credits from a list, therefor be able to make ANOTHER loop for the variables
ex:
if b==1:
print y0
elif b==2:
print y0
print y1
Comment