Answer:
Step-by-step explanation:
The following is written in Python, no loop was needed and using native python code the function is simpler and more readable.
import math
def coffee():
dollar_amount = int(input("How much money will you be using for your purchase?: "))
free_coffees = math.floor(dollar_amount / 7)
remaining_stars = dollar_amount % 7
print("Dollar Amount: " + str(dollar_amount))
print("Number of Coffees: " + str(dollar_amount + free_coffees))
print("Remaining Stars: " + str(remaining_stars))