A program that prints output of an algorithm in reverse is given below, complete with the algorithm:
step1 = input("what number? ")#gets your input
step2 = int(step1) #makes sure it's an int not float
step3 = bin(step2) #converts it to binary (you method doesn't work for e.g. 7)
step4 = step3.replace("0b", "") #removes 0b from the binairy number
step5 = step4[::-1] #reverses the string
print (step5)
num = int(input())
while num > 0:
y = ( num % 2 )
print( y , end = ' ' )
num = ( num / / 2 )
print ( )
num = int ( input ( " Enter a number " ) )
string = " "
while num > 0 :
y = str ( num % 2 )
string + = y
num = ( num / / 2 )
reverse = string [ : : - 1 ]
print ( reverse )
Read more about programming here:
https://brainly.com/question/23275071
#SPJ1