Answer:
See Explaination
Step-by-step explanation:
a and b two variables contains the random numbers.
a contain the previous number and b contains the current number .
count variable counts the number of calls to random function.
while loop is run until the absolute difference between a and b is greater than 0.05
Code:
from random import random
a = random()
b = random()
count = 2
print('{:.2f}'.format(a))
print('{:.2f}'.format(b))
while(abs(a-b)>0.05):
a = b
b = random()
count = count+1
print('{:.2f}'.format(b))
print('Total of', count, 'calls were made.')