0
Whatâs wrong in here?
Hi, I want to know why this while loop works twice and when completed then loop works third time. (I know I didnât add break). Thanks in advances. https://code.sololearn.com/cCv8FU7MfWww/?ref=app
2 RĂ©ponses
+ 1
This a multiple input right? Ive tried it to a different IDE and The problem is the function askCourses is also called by other functions of the class thats why it runs 3 times. I hope this helps.
https://code.sololearn.com/cNhh5RZJLt9o/?ref=app
+ 1
ă Nicko12 ă
Thank you so much Nicko, yes this helped me :) . I also put the print function into another defâfunc there for temporarily. I will find a way to access to courseList[] and print what is inside it by a defâfunc for only printing job.