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, 22.06.2019 08:00
What is the first step in creating a maintenance ?
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
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
question
Mathematics, 21.09.2021 20:20
question
Mathematics, 21.09.2021 20:20
question
Mathematics, 21.09.2021 20:20
question
Mathematics, 21.09.2021 20:20
question
Mathematics, 21.09.2021 20:20
question
English, 21.09.2021 20:20
question
Business, 21.09.2021 20:20
question
Mathematics, 21.09.2021 20:20
question
History, 21.09.2021 20:20
Questions on the website: 13722360