22.1k views
3 votes
Write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a divisor (denominator). Your program should then divide the numerator by the denominator. Lastly, your program will add the quotient and the remainder together.

Sample Run:

Input the dividend: 10
Input the divisor: 4
The quotient + the remainder is 4.0

language: python

User Sjakelien
by
4.6k points

1 Answer

2 votes

Answer:

dividend = float(input("Input the dividend: "))

divisor = float(input("Input the divisor: "))

quotient = dividend / divisor

remainder = dividend % divisor

print("The quotient + the remainder is %.1f" % (quotient + remainder))

Step-by-step explanation:

User Amandeep Chugh
by
5.0k points