15th Jul 2019, 6:46 AM
Ankit Tiwari
Ankit Tiwari - avatar
5 odpowiedzi
+ 3
Nuke, everything you need is well defined. And as you have done a complete python course you are able to solve this problem yourself. I am not sure what your attached code is meaning - sorry!
15th Jul 2019, 7:56 AM
Lothar
Lothar - avatar
+ 2
Hi Nuke I found myself with a bit of spare time, & your question has peaked my interest, so I played a bit. I think numpy might help you with your answer, there is a good intro module on Sololearn. I will attach a sample code for you to play with, but I suggest you spend the time to learn the basics first. https://code.sololearn.com/cUytlZaVkh7K/?ref=app
17th Jul 2019, 9:51 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
I agree with Lothar. The instructions seem quite specific. Try writing a code to suit each line of the instruction to get a feel of the result. Then try to put it all together, I suspect range or a while loop may be involved. Refer back to your python course & check out similar codes for inspiration. PS: Your code looks to be trying to achieve a result too directly. A bit like writing a book which says,"Once upon a time. The End". Develop your logic. Good luck
15th Jul 2019, 8:26 AM
Rik Wittkopp
Rik Wittkopp - avatar
0
Sorry your answer doesn't help in anyway Rik Wittkopp Lothar
17th Jul 2019, 3:09 PM
Ankit Tiwari
Ankit Tiwari - avatar
0
I don't like this aap 😞
21st Jan 2024, 9:34 AM
Bharti Sawant
Bharti Sawant - avatar