How do I get the mathematical calculation out of this equation?

Hello guys, I’m starting to learn Python, and I’m having trouble with this code.

https://replit.com/@genxal97/EnergeticSnarlingPi#main.py

How do I get the mathematical calculation out of this equation?

Hello guys, I’m starting to learn Python, and I’m having trouble with this code.

https://replit.com/@genxal97/EnergeticSnarlingPi#main.py

1 Like

the code is so bad that I can’t tell if this is a parody

```
('X'==9 and 'Y'==5)
Z=('X' + 'Y');
print("current value of 'Z' after task is : ", Z)
```

You are … bruh ;-; this is … how

```
X, Y = 9, 5
Z = X + Y
print("current value of 'Z' after task is : ", Z)
```

You need to change `==`

to `=`

for var declaration & `'VAR'`

doesn’t work, just do `VAR`

.

1 Like

sorry, I am still learning.

1 Like

yeah totally fine, just mark my post as solution please

It’s giving me an unexpected indent error on line 2.

1 Like

That means you wrote the code wrong. I recommend following a basic python tutorial of which there are many on google, before you start coding.

2 Likes

Look up Python tutorial or W3Schools Python and follow the tutorials there. You can also do 100 days of code here on Replit!

3 Likes

This is like the worst parts of JS and Python had a baby. But, beginner code tends to look horrid to experienced devs.

2 Likes

did you copy paste that exactly?

that is true lol ok then…

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.