Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
This is Very Hard!
#11
(Aug-15-2020, 07:50 AM)Harshil Wrote: Who's Solution I Should I DO?
Yours own. One that you fully understand
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#12
The hint about division makes the first actually a bit more obvious.

What if you multiplied all of the numbers in the list together, then divided that number by the numbers in each position to generate your array?

Second part, without division, multiply the numbers in the list except (ie use if statement) for the one in the position determined by your loop index.

First thing, from an educator - think about what the assignment is trying to teach you. That will be the first step. Here you are learning about lists and loops.
Reply
#13
(Aug-16-2020, 11:54 AM)jefsummers Wrote: The hint about division makes the first actually a bit more obvious.

What if you multiplied all of the numbers in the list together, then divided that number by the numbers in each position to generate your array?

Second part, without division, multiply the numbers in the list except (ie use if statement) for the one in the position determined by your loop index.

First thing, from an educator - think about what the assignment is trying to teach you. That will be the first step. Here you are learning about lists and loops.
Thanks!
Reply
#14
(Aug-14-2020, 03:53 PM)Harshil Wrote: Follow-up: what if you can't use division?

I interpret this as a warning.
If a list happens to have one or more zeroes, x/0 or 0/0 will not produce the goods.
All multiplication solutions will work regardless.

Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Forum Jump:

User Panel Messages

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