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 odpowiedzi
+ 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.