Mar-08-2021, 03:31 PM
Hi everyone,
I keep running in to this issue when I want to create an Else statement. I think something goes wrong with the indentation, but I could be wrong. I tried looking for proper explanations, but I'm still getting errors.
Something goes wrong after 'Print('Same'). It doesn't jump to the next line. So I gave it an enter. Here is probably where I'm going wrong. But I don't know how to fix it.
I keep running in to this issue when I want to create an Else statement. I think something goes wrong with the indentation, but I could be wrong. I tried looking for proper explanations, but I'm still getting errors.
Something goes wrong after 'Print('Same'). It doesn't jump to the next line. So I gave it an enter. Here is probably where I'm going wrong. But I don't know how to fix it.
# samedifferent
>>>
>>> d1 = 1.11 - 1.10
>>> d2 = 2.11 - 2.10
>>> print('d1 =', d1, ' d2=', d2)
d1 = 0.010000000000000009 d2= 0.009999999999999787
>>> if d1 == d2:
print('Same')
>>> else:
SyntaxError: invalid syntaxAny help of hints?
