Computers and Technology

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)

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:30, sumayyahjj
An attribute on a webpage allows you to set borders and change background colors. true or false
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, bre563
Research data that is presented using descriptive language is said to be
Answers: 2
image
Computers and Technology, 23.06.2019 06:00, Disd112984
Which statement is true of web-based social media? a. they allow consumers to interact with and update content. b. they cannot be updated easily, as compared to print media. c. they are expensive to produce and maintain, as compared to print and television. d. they can exist independent of the internet.
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, lyn94
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
Do you know the correct answer?
I have a hw on convert to binary - functions but i recieved a message saying 'Could be your program...

Questions in other subjects:

Konu
Mathematics, 01.03.2021 21:00
Konu
Mathematics, 01.03.2021 21:00