subject

I have a hw on convert to binary - functions but i recieved a message saying 'Could be your program never finished, due to an infinite loop, infinite recursion, waiting for input, or other possibilities.'

my code:
import math

def integer_to_reverse_binary(integer_v alue):

remainder = ""

while integer_value>=1:

remainder+=str(integer_value % 2)

integer_value=math. floor(integer_value/2)

reverse_string(remainder)

def reverse_string(input_string):

binaryOutput=""

for i in range(len(input_string)-1,-1,-1):
binaryOutput = binaryOutput + input_string[i]

print(binaryOutput)

integer_value = int(input("Enter a Number : "))

integer_to_reverse_binary(integer_v alue)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
What are loans to a company or government for a set amount of time
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Read โ€œsuburban homes construction projectโ€ at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Is a type of bullying that takes place when a person intentionally posts negative information about another person that is not true.
Answers: 2
You know the right answer?
I have a hw on convert to binary - functions but i recieved a message saying 'Could be your program...
Questions
Questions on the website: 13722359