TORONTO KIDS COMPUTER CLUB | Aurora Wednesday 18:30 Python Practice 21.10.20.
19980
post-template-default,single,single-post,postid-19980,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Aurora Wednesday 18:30 Python Practice 21.10.20.

24 Oct Aurora Wednesday 18:30 Python Practice 21.10.20.

Question:
Modify the program we made in the class, so you could convert decimal number into any base number between Binary(base 2 number ) to Hex(base 16 number)

remember the hex number (base 16 number) is consist of 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F

while OCT number  (base 8 number) is consist of 0,1,2,3,4,5,6,7 only

you could use windows calculator with option of “programmer” to check your answer.

Sample Input 1:
Number: 1258
Base: 16

Sample Output 1:
4EA

Sample Input 2:
Number: 1258
Base: 8

Sample Output 2:
2352
No Comments

Sorry, the comment form is closed at this time.