Help me please (Calculator project)

So i have to do the “+/-” button on calculator which changes the mark infront the number. For example i click on number 8 and then on “+/-” button and it must change to negative eight. Here is my try to do it but nothing worked so far.

2 Likes

Try my project Thunkable
Just see !!

You dont have the “+/-” button which i need so much

1 Like

Okay but I send my link for good UI

The image you shared will not display “-” in front of the number. The code will set app variable Display to True or False.

Can i share my project with You so You could help me please?

1 Like

Do this.

image

1 Like

This one worked but calculator counts wrong. Example: -5 + 5 = 10, not 0.

1 Like

This means you have problems in another place in your code.

I need this to not just be visually “-” mark but mathematical element

1 Like

The code I showed you is 100% mathematical. There is a problem somewhere in your app.

May i show You the code please?

1 Like

OK. But tell me where are you testing in your code so I don’t have to read all the code if it is a big one.

1 Like

Thunkable uncollapsed blocks are where im testing

https://x.thunkable.com/copy/f1904e63dd37479c8c9ecd7d325c7a1c

1 Like

image

Check this and let me know.

Works perfectly only when i want first digit to be negative but when i choose second digit as negative the button appears into divide button. For example -4 + 3 = -1 (works fine) 8 + (-4) = 2 for some reason, not 4.

1 Like

Check how you process your input. I will not be able to go through all the blocks.

1 Like

Now everything is working perfectly! Thank you so much!

1 Like

I quickly checked you code and found that you have TWO places for the “PlusMinus” button. This was the problem because the other one is “/”
so 8/-4 = -2