filmov
tv
Coding to Christmas – Python - Challenge 2
Показать описание
Elf Presents
Mrs. Claus wants to reward 120 hard working elves. She wants to buy them each a present, plus 3 baubles and 2 candy canes.
The baubles cost £2.40 for 6. Candy canes are 10 for £1.00. The presents are £5.00.
Write a script that will work out how much it will it cost her to get these gifts for all the elves and print out a sentence stating this.
Overview:
In this challenge, you’ll learn how to get your computer to do some arithmetic and display the information out to the screen.
This will allow you to answer the challenge above, as well as link to additional questions for you to try out.
What you’ll need:
What you’ll learn:
• Data types
• Variables
• Numerical Operators
• Casting
• Concatenation
• Print function
Mrs. Claus wants to reward 120 hard working elves. She wants to buy them each a present, plus 3 baubles and 2 candy canes.
The baubles cost £2.40 for 6. Candy canes are 10 for £1.00. The presents are £5.00.
Write a script that will work out how much it will it cost her to get these gifts for all the elves and print out a sentence stating this.
Overview:
In this challenge, you’ll learn how to get your computer to do some arithmetic and display the information out to the screen.
This will allow you to answer the challenge above, as well as link to additional questions for you to try out.
What you’ll need:
What you’ll learn:
• Data types
• Variables
• Numerical Operators
• Casting
• Concatenation
• Print function