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 20:50
What is the difference between windows 7 and windows 10?
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Write and test a python program to find and print the largest number in a set of real (floating point) numbers. the program should first read a single positive integer number from the user, which will be how many numbers to read and search through. after reading in all of the numbers, the largest of the numbers input (not considering the count input) should be printed.
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
Questions on the website: 13722367