I'm just messing around and I want to make a "Loading Bar" print. I want it to say "Calculating..."
with each .
adding to Calculating
after 1 second each. I'm using end=''
to keep the dots on the same line but instead of waiting 1 second and then adding each period, it waits 3 seconds and prints "Calculating..."
altogether.
import time
dividend = input("Enter number to be divided: ")
divisor = input("Enter divisor: ")
dividend = float(dividend)
divisor = float(divisor)
wholenum = dividend // divisor
remainder = dividend % divisor
print("Calculating", end='')
time.sleep(1)
print(".", end='')
time.sleep(1)
print(".", end='')
time.sleep(1)
print(".")
time.sleep(1)
print("The quotient is:", wholenum)
print("The remainder is:", remainder)