0
How to loop this code indefinitely?
I wrote some code to convert a base-10 number to a base of the user's choice. However it only works for a finite number and I would like to make it more dynamic, basing the length of the loop on the input. also I don't want to print unnecessary 0's in the prefix of the numbers printed. https://code.sololearn.com/cj8b0KsfVBPR/?ref=app
2 Answers
+ 1
Loops are broken automatically by SoloLearn if it takes too long to process the output. I've had this happen way too often. This is why at high numbers your function stops. I hope I could be of help
0
I have not encountered your problem of prefix 0s in the output. Unfortunately, there is not much that can be done about the function just outright stopping at higher values. Although I was able to change how the function outputs the number (compacted it).
https://code.sololearn.com/c1oES293M87T/?ref=app