Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8533097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:52:42+00:00 2026-06-11T09:52:42+00:00

I am creating a mathematic app for iOS that contain simple tasks for children.

  • 0

I am creating a mathematic app for iOS that contain simple tasks for children.

My objective is: compare an user answer with a defined answer in the particular task.

For example: users have to answer on questions e.g. 10 + 6 = 16, 20 – 2 = 18 etc…

But also I have task that users must solve in few steps.

For example: Ben went 5 miles. In the next day he went 10 miles. To get home, he needs to walk 20 miles. Question is – how many miles does he needs to walk to get home?

So the solution is next:

  1. 5 + 10 = 15
  2. 20 – 15 = 5

Answer: 5 miles

Well, I have created all my tasks in the JSON format and now I can compare user answer and right answer based on the string. But now I have a little bit problem. For example if I compare full string thats means I don’t allow users move components. For example user can create next solution:

  1. 10 + 5 = 15 but also he can create another variant 5 + 10 = 15.
  2. 20 – 15 = 5

So, there are no problems if I will keep all anwers, because I will analyze all strings and it will be perfect. But I think this is bad solution to keep all answers in JSON (I mean all variant answers)

But, maybe it is only one solution. What do you think?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:52:44+00:00Added an answer on June 11, 2026 at 9:52 am

    Ok so you don’t want to transfer too much Data via JSON format. I would suggest using brackets to ensure order of operations. Evaluate the answer to make sure it is the correct one. On the server, you could run a script that cuts the numbers out and put them into an array list of some sorts. Then check if all the numbers in the correct answer are in the numbers in the user submitted string. If you are only doing addition, then your fine but if you introduce new operations like division or modulo, you need to use brackets are evaluate each operation by expanding brackets. For example, you would have an answer like 10+(9+2). Evaluate 9+2 first and ensure that all the operations that are happening in the brackets are correct and then evaluate the answer in that set of brackets with the operations on the outside. Don’t do too many computations on the phone though.
    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm an amateur developer and I'm creating an Android app that will perform long
Creating an a app, where I store bunch of photos in the drawable folder,
Creating liquid layouts is an immense pain. Now, I totally understand that tables should
Creating a google map with store locations within 50 miles of user entered address.
Creating a simple RPG game, first time using XNA. Trying to get my character
Error creating bean with name 'sessionFactory' defined in class path resource [ApplicationContext.xml]: Invocation of
Creating a calculator-like dialog, I noticed that quickly clicking on a button in IE
Creating an installer for possible remote systems so that if they do not have
I am creating a bouncing object that can bounce around a 2D rectangular room.
I have a drawing application in Android that allows the user to draw with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.