Codecademy

Sign In Create Account
01/05
Your Favorite Meal

This project is designed to complement Unit 1: Python Syntax. It assumes familiarity with only the material covered in that course.

You've just feasted on a truly delicious meal of Spam and eggs. The diner's computer is down, however, so you'll need to compute the cost of your meal yourself.

Here's how it'll break down:

Cost of meal: $44.50

Restaurant tax: 6.75%

Tip: 15%

You'll want to apply the tip to the overall cost of the meal (including tax).

First, let's declare a variable meal and assign it the value 44.50.

Stuck? Get a hint!Hint

Don't use any dollar signs ($)—just the numerical cost of the meal, 44.50.

Remember, we can assign a value to a variable like so:

variable_name = # Your value here!
Save & Submit Code Reset Code
Back to editor

Start Here

Each lesson starts here. Read the explanation, then follow the instructions underneath. If you get stuck, you can click on the "Hint" for help.

Enter your Code

Type your response to the instructions here, in your code editor.

Submit!

Ready to see if your code does what it should? Click "Save + Submit" to run and check your code!

Click "Save + Submit" to run your code! Your code’s output will pop up on the screen.

See What it Does

This is the terminal. When you submit your code, it will run your code and display the result here.

Sign in to Codecademy