0
How do I Print Octal Number from 0 -1000 using python?
2 Answers
0
Hints:
1) Use `print(oct(your_num))` to print octal representation of a number (for example, `oct(56)` returns "0o70", so you could use `oct(your_num)[2 :]`).
2) 1000 in octal is 8^4 = 512, so you can use `range(513)` (numbers from 0 to 512)
Hope you can now code it for yourself. But if you still do not understand how to do it and it is not an assignment, homework or so, I can provide the full code (if that appropriative to SoloLearn Q&A rules).
0
How to DO THIS BY USING LOOP?