Overclock.net - An Overclocking Community - View Single Post - Why is this correct? Looks to me like it shouldn't work.

View Single Post
post #1 of (permalink) Old 10-23-2017, 11:46 AM - Thread Starter
PhotonFanatic
New to Overclock.net
 
PhotonFanatic's Avatar
 
Join Date: Dec 2009
Posts: 1,878
Rep: 19 (Unique: 18)
First let me say that I'm a complete and utter newb to programming, so your answers will have to be very basic. I've decided to learn python. So I'm doing all the free exorcises over at code academy. I'm still near the very beginning, only on lesson 2. And to me, it looks like to get the answer to the total cost of the meal, you'd print this:


meal = meal + tax + tip


But no, as you can see, it wanted this:





How could you add the cost of 2 meals together, and ever get the right answer? The correct answer is clearly saying "meal + meal". And meal is clearly defined in the pic, so they're adding the cost of a whole other meal. I don't get it.

"Executing execution.exe"
Bang for the buck
(12 items)
CPU
3570k @ 4.6Ghz @1.35v
Motherboard
Gigabyte Z77x UD3H
GPU
evga GTX 970 SSC
RAM
16Gb Gskill Ripjaws 2133Mhz @ 9-11-10-28
Hard Drive
Samsung Evo 850
Power Supply
Silverstone 900 watt
Cooling
Thermalright Ultra 120 Extreme
Case
Silverstone Raven (1st edition)
Operating System
Windows 10 Spy Delux
Monitor
Xstar 27" PLS 1440p
Keyboard
Wireless ergonomic
Mouse
Logisys Wireless trackball
▲ hide details ▲
PhotonFanatic is offline