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.
Try my project Thunkable
Just see !!
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?
This one worked but calculator counts wrong. Example: -5 + 5 = 10, not 0.
This means you have problems in another place in your code.
I need this to not just be visually “-” mark but mathematical element
The code I showed you is 100% mathematical. There is a problem somewhere in your app.
May i show You the code please?
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.
Thunkable uncollapsed blocks are where im testing
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.
Check how you process your input. I will not be able to go through all the blocks.
Now everything is working perfectly! Thank you so much!
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