7 kyu

Pizza Payments

900 of 2,292KarinJacobs

Description:

Kate and Michael want to buy a pizza and share it. Depending on the price of the pizza, they are going to divide the costs:

  • If the pizza is less than €5,- Michael invites Kate, so Michael pays the full price.
  • Otherwise Kate will contribute 1/3 of the price, but no more than €10 (she's broke :-) and Michael pays the rest.

How much is Michael going to pay? Calculate the amount with two decimals, if necessary.

Fundamentals

More By Author:

Check out these other kata created by KarinJacobs

Stats:

CreatedMay 22, 2018
PublishedMay 22, 2018
Warriors Trained3371
Total Skips41
Total Code Submissions12520
Total Times Completed2292
JavaScript Completions900
Python Completions912
Ruby Completions112
Java Completions435
Total Stars33
% of votes with a positive feedback rating87% of 500
Total "Very Satisfied" Votes387
Total "Somewhat Satisfied" Votes99
Total "Not Satisfied" Votes14
Total Rank Assessments17
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • KarinJacobs Avatar
  • anter69 Avatar
  • ___i Avatar
  • delucas Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad