Verify your answer to part a by writing a short python


PLEASE SOLVE WITH SOFTWARE PYTHON

The binary expansion of 1/7 is (0.001001001...)2 (repeating).

a) Assuming Python also stores 1/7 with 54 digits, how many applications of the operation: x = 8*(x - 1/8) would have to be applied before x was no longer a fraction?

(Recall that 1/8 = (0.001)2, while multiplying by 8 moves the binary "decimal point" three places to the right.)

b) Verify your answer to part a by writing a short Python function called strange17, taking n as its argument, which applies this operation to 1/7 n times and returns the result.

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Verify your answer to part a by writing a short python
Reference No:- TGS02893601

Expected delivery within 24 Hours