id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu all > decimalToBinary
prev  |  next  |  chance

Given a decimal number in a string formatted like "12", return a string that represents the number in binary. "15" in decimal is "1111" in binary.


decimalToBinary('0') → '0'
decimalToBinary('1') → '1'
decimalToBinary('2') → '10'

...Save, Compile, Run (ctrl-enter)

def decimalToBinary(d):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy