


Print(integer_to_binary_string(user_input)) Rev_str = integer_to_reverse_binary(int_value)ĭef integer_to_reverse_binary(int_value): '''Converts integer to a string of base-2 bits, I chose the log2 function and the for loop to calculate how long to run, rather than trying to guess if the calc is over on each pass of the loop, but I assume there is a cleaner/simpler way to do that. My experience level is I've been using Python for about 7 years, hobbyist, haven't collaborated with other programmers ever, and I'm now in a Comp Sci degree program. My goals are correctness and that it is obvious what the code is doing.

Please review it for good style and organization, and I'm especially looking for a critique of the algorithm and level of documentation. For example, input 2 outputs '10' and input 25 outputs '11001'. This code takes a user input number which is a positive integer, and outputs a string representation of the number in binary.
