Question: test your program for at least n=64 need help 9. Power of two is important in computers because all the arithmetic is performed using binary

test your program for at least n=64 need help
9. Power of two is important in computers because all the arithmetic is performed using binary numbers (0 and 1). Computer RAM memory comes in sizes that are powers of two and the addresses of the data in the memory is specified by binary numbers. Your task is to find and print out the powers of two for the first "n" values. a. [10 marks) Write a program, myPower.py, which computes the value of x fi.e. integer x raised to the power of integer n). This program must get n and x from user and calculates and prints x raised n. Do not use the Python operator, 2**n to calculate 2 raised n. b. [10 marks) Write a program myPower2.py that asks the user for an integer number like n. Then first prints a header line followed by the lines that represents an integer number less than n (eg. x) and the corresponding value which is x. For example, the following output is printed when user enters 5 as the input number. Enter a non-negative integer number: 5 power 2. 3 4 9 16 Print a header line as shown above then the output results below. Use tab characters ("\t") to space your results in a pleasant manner
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
