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 trialSaadia Fattah
1,939 PointsI don't understand why it's wrong.
Bummer: (eval):1: syntax error, unexpected '=', expecting end-of-input 25 * 3 = 75 ^
25 * 3 = 75
product = 75
7 \ 4.0 = 1.75
qoutient = 1.75
2 Answers
Rogier Nitschelm
iOS Development Techdegree Student 5,461 PointsHello there,
The =
-operator is used to assign a value to a variable. Like so:
count = 75 # stores the number 75 in a variable named count
The ==
-operator is used for comparison. Like so:
25 * 3 == 75 # true
You cannot use =
for comparison of two values.
25 * 3 = 75 # invalid, you are trying to assign 75 to the expression 25 * 3.
25 * 3 == 75 # valid, you are comparing 25 * 3 with 75. Which are equal
Rogier Nitschelm
iOS Development Techdegree Student 5,461 PointsYou are welcome :)
Saadia Fattah
1,939 PointsSaadia Fattah
1,939 PointsTHANK YOU!!!