Home / Expert Answers / Computer Science / zybooks-lab-nbsp-i-don-39-t-know-what-39-s-wrong-with-this-nbsp-please-give-me-right-answer-4-14-lab-pa787

(Solved): Zybooks lab  I don't know what's wrong with this  please give me right answer 4.14 LAB: ...



Zybooks lab 

I don't know what's wrong with this 

please give me right answer

4.14 LAB: Convert to reverse binary
Write a program that takes in a positive integer as input, and outputs a string of 1s anLAB
ACTIVITY
4.14.1: LAB: Convert to reverse binary
1 x int(input())
2
3 while(x > 0):
print(x % 2, end=)
x= x // 2
DevelopLatest submission - 9:39 PM EDT on 05/28/22
Only show failing tests
1: Compare output
Output is nearly correct; but whitespac

4.14 LAB: Convert to reverse binary Write a program that takes in a positive integer as input, and outputs a string of 1's and O's representing the integer in reverse binary. For an integer x, the algorithm is: As long as x is greater than 0. Output x modulo 2 (remainder is either 0 or 1). Assign x with x divided by 2 Note: The above algorithm outputs the O's and 1's in reverse order. Ex: If the input is: 6 the output is: 011 6 in binary is 110; the algorithm outputs the bits in reverse. 390436.2615738.mp3y7 LAB 4.14.1: LAB: Convert to reverse binary 0/10 ACTIVITY Load default template main ny LAB ACTIVITY 4.14.1: LAB: Convert to reverse binary 1 x int(input()) 2 3 while(x > 0): print(x % 2, end='') x= x // 2 Develop mode Submit for grading 0/10 main.py Load default template.. When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. Submit mode Latest submission - 9:39 PM EDT on 05/28/22 Only show failing tests 1: Compare output Output is nearly correct; but whitespace differs. See highlights below. Input 6 Your output starts 011 with Expected output 011 starts with 2: Compare output Output is nearly correct; but whitespace differs. See highlights below. Input 19 Your output starts with Expected output starts with 11001 11001 Special character legend Special character legend Total score: 0/10 Download this submission 0/4 0/3


We have an Answer from Expert

View Expert Answer

Expert Answer


#taking input from user userNum = int(input("Enter the nu
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe