Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJasper Spierenburg
Python Development Techdegree Student 5,575 PointsI've multiplied the $integerOne by $floatOne using echo ($integerOne * $floatOne); and receive an error
Challenge Tasks 1 + 2 have been completed correctly. In Challenge task 3 I've added the above line. When I check the results it shows "9" which would suggest the code does what is asked of it (multiply 6 by 1.5). The error however says I should use echo instead of var_dump but that is exactly what I'm doing
<?php
//Place your code below this comment
$integerOne = 1;
$integerTwo = 2;
$floatOne = 1.5;
$integerOne = $integerOne +5;
var_dump ($integerOne);
$integerTwo = $integerTwo -1;
var_dump ($integerTwo);
echo ($integerOne * $floatOne);
?>
2 Answers
Adam N
70,280 PointsTry removing everything from your script that the tasks never asked for. The system can be picky
Let me know if this helps here
Jasper Spierenburg
Python Development Techdegree Student 5,575 PointsThanks! I removed some lines and it worked out. I thought the idea was to keep the 1/3 and 2/3 code that was there :)
Adam N
70,280 PointsYa, the tasks never explicitly asked for var_dumping and that ended up catching up with you in task 3.
You can mark this question as solved by selecting a "best answer".