python please
Posted: Thu Jul 14, 2022 2:19 pm
python please
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0'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 0'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. 393630.2637816.9×329y7 main.py Load default template... 1 ' Type your code here. " 2
Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x+7y=38 and 3x−5y=−1 have a solution x=3,y=2. Given integer coefficients of two linear equations with variables x and y, use brute force to find an integer solution for x and y in the range −10 to 10 . Ex: If the input is: Then the output is: x=3,y=2 Use this brute force approach: Eor every value of x from −10 to 10 For every value of y from −10 to 10 Check if the current x and y satisfy both equations. If so, output the solution, and finish. Ex: If no solution is found, output:
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0'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 0'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. 393630.2637816.9×329y7 main.py Load default template... 1 ' Type your code here. " 2
Numerous engineering and scientific applications require finding solutions to a set of equations. Ex: 8x+7y=38 and 3x−5y=−1 have a solution x=3,y=2. Given integer coefficients of two linear equations with variables x and y, use brute force to find an integer solution for x and y in the range −10 to 10 . Ex: If the input is: Then the output is: x=3,y=2 Use this brute force approach: Eor every value of x from −10 to 10 For every value of y from −10 to 10 Check if the current x and y satisfy both equations. If so, output the solution, and finish. Ex: If no solution is found, output: