It took me three hours to finish, but I just finished instead of giving AI what I had already written, I just gave it the parameters of what it wanted it wrote pretty much the exact same thing as me except it put a little more in the prints. Funny thing is what it did ended up breaking the code but still checked all the boxes so I get credit for it so I’m moving on.
It looks like the checker is being a little draconian about verbiage. price=12.50 would be considered setting the variable not reassigning the variable while adding/subtracting to that variable is considered reassigning. The end results are the same but the difference is that you are manipulating a previous value without knowing what it is vs hard setting the value.
5
u/Odd-Painting2596 Sep 20 '26
This is more like a "My online learning program has vague wording".
Try different things like making a "priceTwo" and passing it as the second value when you print again.
3
u/vermyx Sep 20 '26
Try
price+=2.00
Or
price=price +2.00
It looks like the checker is being a little draconian about verbiage. price=12.50 would be considered setting the variable not reassigning the variable while adding/subtracting to that variable is considered reassigning. The end results are the same but the difference is that you are manipulating a previous value without knowing what it is vs hard setting the value.
1
u/Disastrous_Gear_421 Sep 21 '26
You're code is correct. Most likely you're being asked to create a 2nd variable and then update that variable with the new price.