Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
homework help
#2
Couple things to start. The assignment says your PolCal should take one argument, not two. In line 20 you will then call it on b, which is the list you generated in the first part.
Second, whenever you are tempted to use range(len(x)), don't. You can say for i in li and it does the same thing, easier to read, easier to debug. It is also a very good idea to use descriptive variable names. We've come a long way from Fortran where variables starting with "i" through "n" were integers and the rest floats.
PolCal also needs to return two lists. You are returning one single value. Read that part of the assignment again and think about what you want to generate, and then how.
Reply


Messages In This Thread
homework help - by maisaadabbah - Jan-13-2020, 03:35 PM
RE: homework help - by jefsummers - Jan-13-2020, 11:16 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020