I need. Help with this converter app

So

I’m new to this… I’m not aware of coding and started just few days

So I’m making an app with thunkable and it’s a unit converter app

I’m having difficulty in it …
So i wanna add two units

A1, B1 + A2, B2

B is the sub unit of A

The thing is 1 unit of A= 16 units of B

So if i want to add 2a, 15b + 1a, 3b it should give me the answer of 4a, 2b

How do i do that… please help

You can assign variables (like variable a and variable b ) which will be holding the values and then you can do the math

1 Like

It seems like this is a two-step process:

  1. Figure out the math that makes the conversions work
  2. Code the blocks to convert the input values

Do you have a working algorithm for step 1? I would set that up before moving to step 2. The algorithm should go into depth as far as what happens with A, B, and the result. You’ve given one example of how that might be calculated but what are the actual individual steps of calculating the answer? Again, this is a math problem first and a coding problem second.

Actually i was able to make a python script with the use gpt 3.5 . But i need an app…

I just want to add B1, and B2,
If the sum is less than 16 then it can be the answer
If the sum is more than 16 then divide the sum with 16,
And add the quotient to sum of A1 and A2 and the remainder becomes the sum of (B1 and B2) it’s too complicated.

For example 2a, 5b + 3a 10b = 5a 15b

But 2a, 5b + 3a, 12b = 6a, 1b

Great, so you can now take that algorithm and start to connect blocks to create the mathematical calculations that you need.

If you get stuck, post a screenshot of your blocks or a link to your project.

I’m sorry sir but I really don’t know how to use blocks in this case… I don’t know which one to use , I tried finding something on YouTube… but no help

The thing is I don’t see any block that can separate quotient and reminder… I’m newbie in this

You can search the forums or look through the math functions in the documentation here.

here’s how you get quotient and remainder - you should try searching the forums or try reading the online docs.

Thank you for this… is there any courses available that would help me to learn?

*remainder

In @manyone’s example, the remainder was in the form remainder(x÷y) and the quotient was in the form round down(x÷y).

In your screenshot, the “x” part is “B1’s Text + B2’s Text” so you need to use that for the second set of blocks as well in the form round down (x÷y).

Don’t use the “remainder of” block for the second part… use the division block (÷). And then a separate “round down” block as shown in @manyone’s screenshot.

If you want to share a link to your project, I can make a screenshot using your actual values.

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