You are running a small coffee shop. Complete the program so it:
- Creates variables for:
- The coffee shop name (
"Bean Haven Cafe") - The number of coffees sold (
24) - The price of one coffee (
4.5) - The number of new customers (
5)
- The coffee shop name (
- Uses arithmetic operators to calculate the total earnings.
- Uses the increment operator to increase the number of customers by 1.
- Prints the number of customers and the total earnings. Output should be as follows:
Total number of customers:
6
Total earnings:
108.0
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 4
single
Challenge: Calculating Coffee Shop Revenue
Swipe to show menu
Task
Swipe to start coding
You are running a small coffee shop. Complete the program so it:
- Creates variables for:
- The coffee shop name (
"Bean Haven Cafe") - The number of coffees sold (
24) - The price of one coffee (
4.5) - The number of new customers (
5)
- The coffee shop name (
- Uses arithmetic operators to calculate the total earnings.
- Uses the increment operator to increase the number of customers by 1.
- Prints the number of customers and the total earnings. Output should be as follows:
Total number of customers:
6
Total earnings:
108.0
Solution
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 4
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat