This HAS to be something on my end because I’m running into the same issue in PyCharm. I’m currently going through the Python 3 lessons, and I’m on Changing Numbers, where you change the value of a variable halfway through.
The 1st objective is to figure out how many squares you need to complete a quilt, by multiplying the width (8) by the height (12) of the quilt.
quilt_width = 8
quilt_length = 12
total_squares = quilt_width * quilt_length
print(total_squares)
Done! It prints 96!
The second objective says, “Oops! This project is bigger than we expected, so let’s change the length from 12 to 8.” Ok!
quilt_length = 8
print(total_squares)
Answer: 96.
It still says it’s correct enough to let me move on to the next lesson, but I don’t want to move on when I know it’s not the right answer, because I’m not sure what’s causing it.
Here’s the full:
#Prints 96
quilt_width = 8
quilt_length = 12
total_squares = quilt_width * quilt_length
print(total_squares)
#Still prints 96, even though we know 8*8 is 64
quilt_length = 8
print(total_squares)
Thanks for your help! This is a weird one for me because there’s no official errors, but I know it’s an error.