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 trialAlex Oosterveen
560 PointsI received any time error
My english is not so good. But i try many this error
It looks Task 1 is no longer
<?php
//Place your code below this comment
$integerOne = $integerOne + 5;
$integerTwo = $integerTwo - 2;
?>
5 Answers
Alex Oosterveen
560 PointsChallenge Task 2 of 3
Add 5 to $integerOne. Subtract 1 from $integerTwo.
Alexander Acker
18,123 PointsYou'll need to keep in your original code otherwise your mathematical variable updates won't work. For example, in your answer, your defining a variable then taking that same variable which hasn't been assigned to anything yet and adding it to an integer. Thus you should first declare the variable, then feel free to make updates after. Such as the example below.
$integerOne = 1;
$integerTwo = 2;
$integerOne += 5;
$integerTwo -= 1;
Alex Oosterveen
560 PointsWow Thanks for your fast reply
Alex Oosterveen
560 PointsChallenge Task 3 of 3
Create a New Float Variable named $floatOne with a value of 1.5. Without changing the value of $integerOne or $floatOne, multiply $integerOne by $floatOne and display the results.
$integerOne = 1; $integerTwo = 2;
$integerOne += 5; $integerTwo -= 1;
$floatOne = 1.5;
$total = $integerOne x $floatOne; echo $total;
What did I wrong
Ella Ruokokoski
20,881 Pointsyou multiply by using *, not x.
Alex Oosterveen
560 PointsDamm stupid of myself. Thanks