57. Python Program to Split a Bill Between Friends
MediumInteractive
Overview
Mix float and int input in one program.
Problem Statement
Read the bill total (it may have decimals), then the number of friends, and print what each friend pays, with two decimal places. For example, for 1000 and 3, print:
Each friend pays 333.33
Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.
Input
One value per line, in this order. Example:
1000
3
Output
The output for that example:
Each friend pays 333.33
The tests try 3 different inputs.