Oct-13-2020, 09:10 AM
If you got it working then you should have time to consider some other aspects of your code:
- use naming conventions set in PEP8 (Function and Variable Names)
- on row #13 you calculate sum. On next line you calculate it again instead of using already calculated value.
- instead of repeating rows #3-7 and then putting variables into list you can do it in one step (note that I omitted datatype conversion problem as it is already solved):
- use naming conventions set in PEP8 (Function and Variable Names)
- on row #13 you calculate sum. On next line you calculate it again instead of using already calculated value.
- instead of repeating rows #3-7 and then putting variables into list you can do it in one step (note that I omitted datatype conversion problem as it is already solved):
>>> [input(f'Enter mark {i+1}: ') for i in range(5)] Enter mark 1: 1 Enter mark 2: 2 Enter mark 3: 3 Enter mark 4: 4 Enter mark 5: 5 ['1', '2', '3', '4', '5']
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.