# Summer of Code/Sanjay Kumar

## Contents

## Mind Math

```
Challenge your friend to answer (999989)^2
in 10 seconds ;)
```

```
Its simply: Question - 11 | 000 | (11)^2 = 999978000121.
```

### Project idea:

Mind Math will be an interactive approach by which kids of age 9 and above can learn speedy math tricks (also called as Vedic math) and do math as fast as calculator. A user will be prompted to play Mind Math for about 15 - 20 minutes a day to learn and practice a new trick. It will be done by the means of helping his/her friend Tux to complete her Homework and also challenging themselves with calculator. They can also review any completed trick at any point of time. The proposed software will be in the form of web based sugar activity. Need more suggestions from mentors on this.

Sorry for making this project proposal a bit lengthy. My intention is to show the efforts made on this idea.

### About Me

I’m Sanjay Kumar AP Sri Krishna arts and science college, Affiliated to Bharathiyar University, India A very short bio: Sanjay Kumar is currently pursuing his under-graduation degree and he is in his second year at the University. Apart from being an above average student in academics, he loves to work on cool projects outside classrooms.

Email-id: sanjaykumarap18@gmail.com

#### Coding skills

- I am using Windows 10 for my daily needs. I also use Ubuntu 14.04 LTS

operating system for learning more about linux commands and other projects.

- Programming languages/Web technologies :
- C, Python [Learned using MOOCs]
- HTML5, CSS3, JavaScript
- Lua (Started learning it out of curiosity)

- Frameworks/Platform:
- Phaser game framework (version 2.4.6)
- Polymer by Google.
- Django, beginner level.

- I have a decent level of experience and willing to learn any additionally

required skills that are listed under “desired knowledge” to develop a new sugar web based activity.

Why did i choose this idea? I always wonder at my grandparents while they do math. While I’m searching for a calculator, they will reply with the calculated answer. Of Course, we know our brain is many times faster than a normal calculator. But we haven’t learnt to use it as fast as that simple machine. Vedic Math or Speedy Math is one such attempt to refresh our mental ability and in the same time do quick math. As far as i have searched, there is no resources other than books/lectures to learn these tricks. This activity may be a first of its kind. Correct me, If I am wrong.

### Project goals

I. Research on the project idea.

Do an extensive research on the Math tricks that will be useful to the kids and others. Try to get about 35 Math tricks that are easy to be implemented as connected activities. (Implement 10 (+3) during GSoC + remaining in the future by any contributors)

II. Design the game and UI

Design the games and the logic behind it. Make UI implementations for few games to get suggestions from the mentors.

III. Improve UI/UX of the app.

During the community-bonding period request mentors and other members of the community to give feedback and improve the UI/UX of the activity. Once the UI is fixed, head towards to the coding phase.

IV. Implement 10 (+3) Math tricks as games.

Designing and developing the games. Develop an app and warp it using different frameworks and make it available in different sugar platforms. To be done in the GSoC coding period.

V. List out and explain the remaining Math tricks.

List out the remaining 22 Math tricks and explain them so that any future contributors to the Mind Math activity project can take it forward without spending much time on research. As walter suggested, “ something that lets the student explore some of the underlying principles as well as practice computation would be most welcome ” the main objective of it is to make this activity as a productive distraction for the student to play and learn on self.

### Research on the project idea.

Within the limited time, I was able to do a little research on the Math tricks and was able to select 35 tricks to be implemented as games. (Implement 10 (+3) during GSoC + remaining in the future by any contributors) I skimmed through the following resources to learn and select the math tricks.

- Vedic mathematics for schools (Book 1, 2 & 3) - James T Glover
- Vedic mathematics - Jagadguru Swami Sri Bharathi Krishna
- Discover Vedic mathematics - Kenneth R Williams
- Speed Mathematics - Bill Handy
- Vedha Kanidham (in Tamil) - Anbazhagan Devaraj

From the above resources, I found too many interesting tricks. Worth reading! When you can surprise your friends with the value of (95)

2 , (999989) 2 , Cube root of 1089, 67858 * 99998 etc., without any calculator you know how awesome it should be :p

Putting them all together, We can summarize the math tricks as

- 16 Major tricks
- 13 Sub-tricks

A combination of these tricks are referred as vedic sutras / vedic tricks Among them, I chose 35 Tricks that are easy to learn for kids of age 9 and above. I also took the help of 3 children of age 9 -12 in selecting the suitable tricks for that particular age group.

I would be very glad if mentors can look at them and suggest any alternatives or their valuable feedback on my work. But I promise, You may learn at least one new trick by reading this document. :)

### Design the Game and UI

Mind Math will have a Tux or any other children friendly character helping throughout the game to help kids to learn the tricks.

The activity section will have three major parts

- User helping Tux to complete her HomeWork
- User challenging with calculator
- User reviewing the past tricks

Along with the games, the activity will also have a dashboard and an option to view a very detailed analysis report to give the kids and their parents an insight on their performance.

For the list of Math tricks to be used in the games, we shall start from simple tricks in each category and move on to the complex ones. Though the tricks can be generalized and made better, we shall take baby steps and teach them the little tricks and proceed steadily.

#### Category Tricks to be implemented

Square of numbers

- Square of any number ending with 5
- Square of numbers just below 100
- Square of numbers just above 100
- Square of any three-digit number with a ‘0’ in between.

Multiplication

- Multiply any number by 5
- Multiply two-digit number by 11
- Multiply two numbers when the sum of their one’s digit is 10
- Multiply two numbers just above 100
- Multiply two numbers just below the 100
- Multiply a number by 9

The following 3 tricks can be implemented if time permits us to do so Verifying answers

- Check your multiplication answer

Division

- Divide any two-digit number by 9

Miscellaneous

- Find the sum of any 3 x 3 matrix in a calendar

Now coming to the UI, I prefer to follow material design principles with the game sprites and also the application. But if this not recommended and should if any changes are to be done to abide with the sugar community standards, I shall be glad to make any changes.

In the following screenshots, I’m trying to explain the logic that i have thought about and gave little less importance to UI. In my opinion UI should be refurbished further to make it more children-friendly. If given a chance, I will work more on UI/UX of the activity during the community bonding period and see to that only the coding part is left to be done during the GSoC coding period. (As it is recommended)

Fig. 01 splash screen

Fig. 02 User registration screen

We shall recommend user sign in to collect the data and analyze the average time taken to complete any trick in the future stages.

Fig. 03 Welcome screen

Promote the app as a productive distraction to the users. Fig. 04 Dashboard

Fig. 05 Tricks category list

The user must unlock the complex tricks by winning enough lollipops in the simple tricks. This is to make the play more interesting and reasonable. Fig. 06 Tricks available in each category Fig. 07 Game's landing page

- Help Tux’s Homework
- School going Tux will come back in the evening and request her friend(user)

to help her in doing her homeworks. Her friend will ask the Tux to explain him/her the lessons taught in school that day in order to help. After Tux explains, both of them will start doing the homework. Tux will help her anytime, if required. As a thanksgiving, Tux will give lollipops to her friend.

- Calculator challenge
- The user learned many tricks from Tux. In some holiday, they both had a

challenge. Tux will use a calculator to find the answers while the user will use the math tricks to find the answer. The winner will get too many lollipops. The questions will be developed accordingly to be answered as fast as a calculator.

- Learn math tricks
- This option can be used by any curious minds to learn the tricks without

playing the game. The Interface of Help Tux’s homework will be duplicated here to help the user.

Help Tux’s Homework

Fig. 08 Start HomeWork game (Game loading in the background)

Following are those 10 (+3) tricks that i am planning to implement in Mind Math
activity.
```
Trick 01 : Square of any number ending with 5 Let us find (x5)
Step 01: Think of the number next to x.
Step 02: x * number next to x
Step 03: Put 25 at the end of the answer
Answer = Step 02 | 25 = x * ( x + 1) | 25
Example:
Question: (45)
Step 01: Next number to 4 is 5
Step 02: 4 * 5 = 20
Step 03: Put 25 at the end of the answer
Answer = 2025
```

Fig. 9 Start learning the trick Though the below screenshot looks static, Tux will actually explain her friend step by step on every single tap achieved by game animation. Fig. 10 Animated step by step explanation Fig. 11 Tux explaining an example.

Fig. 12 Tux taught the homework trick. Fig. 13 Game screen. Fig. 14 Game screen

```
Trick 02 : Square of numbers just below 100
Let us find (x)^2. X is just below 100.
Step 01: Find the difference between 100 and this number.
Step 02: Now, Subtract the difference from the number (x).
Step 03: Find x^2
Answer = Step 02 | Step 03
Example:
Question: (96)^2
Step 01: Difference is 4 (100 - 96 = 4)
Step 02: 96 - 4 = 92
Step 03: (4)^2 = 16
Answer = 9216
```

```
Trick 03 : Square of numbers just above 100
Let us find (Y)^2. Y is just above 100.
Step 01: Find the difference between the number and 100.
Step 02: Now, Add the difference to the number (y).
Step 03: Find y^2. Add
Answer = Step 02 | Step 03
Example:
Question: (104)^2
Step 01: Difference is 4 (104 - 100 = 4)
Step 02: 104 + 4 = 108
Step 03: (4)^2 = 16
Answer = 10816
```

```
Trick 04 : Square of any three digit ending with zero in between
Let us find (x0y)^2. Digits are referred from left to right.
Step 01: Square third digit (y)^2
Step 02: Multiply x with y and double the answer ( x * y * 2 ). The answer is of two
digits. Add zero in front, if it is in single digit.
Step 03: Square first digit (x)^2
Answer = Step 03 | Step 02 | Step 01 = (x)^2 | ( x * y * 2 ) | (y)^2
Example:
Question: (504)^2
Step 01: (4)^2 = 16
Step 02: 5 * 4 * 2 = 40
Step 03: (5)^2 = 25
Answer = 254016
```

```
Trick 05 : Multiply any number by 5
For now we will consider only the even numbers. Odd numbers will be taught to
kids little later.
Step 01: Find the half of the number (Number / 2)
Step 02: Multiply by 10. (Add a zero in the end)
Example:
Question: 64 x 5
Step 01: Half of 64 is 32
Step 02: Multiply 32 by 10. 32 * 10 = 320 (Simply add a zero in the end)
Answer = 320
```

```
Trick 06 : Multiply a two-digit number by 11
For any two-digit number. Digits referred from left to right.
Step 01: Add the digits
Step 02: Place the sum in between the digits.
Example:
Question: 43 x 11
Step 01: 4 + 3 = 7
Step 02: Place 7 in between 4 and 3
Answer = 473
```

Fig. 15 Start learning a new homework trick Though the below screenshot looks static, Tux will actually explain her friend step by step on every single tap achieved by game animation. Fig. 16 Tux explaining a new trick step by step by animation

Fig. 17 Tux explaining an example

Fig. 18 Tux explaining another example
```
Trick 07 : Multiply two digits when the sum of one’s digit is 10.
For any two numbers with the sum of their one’s digit = 10 and have the same
number in the ten’s digit.
Step 01: Think of the number (x) next to the number in ten’s digit (y)
Step 02: Find x * y
Step 03: Multiply both numbers’ one digit
Answer = Step 02 | Step 03
Example:
Question: 43 x 47
Sum of one’s digit: 3 + 7 = 10; Ten’s digit in both the numbers = 4
Step 01: Number next to 4 is 5
Step 02: 4 * 5 = 20
Step 03: 3 * 7 = 21
Answer = 2021
```

```
Trick 08 : Multiply two numbers just above 100
Let us find Num 01 * Num 02. Num 01 and Num 02 are just greater than 100.
```

Fig. 20 Trick 08 representation (This table is not copied. I made it for our better understanding)

```
Example:
Question: 102 x 108
Step 01 : 102 - 100 = 02
Step 02: 108 - 100 = 08
Step 03: 102 + 08 = 110 and 02 * 08 = 16
Answer = 11016
```

```
Trick 09 : Multiply two numbers just below 100
Let us find Num 01 * Num 02. Num 01 and Num 02 are just lesser than 100.
```

Fig. 21 Trick 09 representation (This table is not copied from any resource. I made it for our better understanding)

```
Example:
Question: 92 x 98
Step 01 : 100 - 92 = 08
Step 02: 100 - 98 = 02
Step 03: 98 - 08 = 90 and 02 * 08 = 16
Answer = 9016
21
Trick 10 : Multiply a number by 9
Let us consider xy * 9
Step 01: Think of next number of x.
Step 02: Subtract it from xy
Step 03: Find 10 - y
Answer = Step 02 | Step 03
Example:
Question: 68 x 9
Step 01: Next number to 6 is 7
Step 02: 68 - 7 = 61
Step 03: 10 - 8 = 2
Answer = 612
```

```
Trick 11 : Verify Multiplication result
Let us consider any multiplication result. To verify the same, we need to
Step 01: Add the digits of the multiplicand until you get a single digit (x)
Step 02: Add the digits of the multiplier until you get a single digit (y)
Step 03: Add the digits of the answer until you get a single digit (z)
Step 04: Check whether z = x * y to verify the result.
22
Example:
Question:
3965 * 694 = 2751710
Step 01: 3 + 9 + 6 + 4 = 23 ⇒ 2 + 3 = 5
Step 02: 6 + 9 + 4 = 19 ⇒ 1 + 9 = 10 ⇒ 1 + 0 = 1
Step 03: 2 + 7 + 5 + 1 + 7 + 1+ 0 = 23 ⇒ 2 + 3 = 5
Step 04: Verify 5 = 5 * 1
Easy to verify :)
```

```
Trick 12: Divide any two-digit number by 9
Consider dividing xy by 9.
Step 01: x is the quotient
Step 02: x + y is the remainder
Step 03: If remainder is greater than or equal to 9, Subtract 9 from it and add one
to the quotient.
Example:
Question: 51 / 9
Step 01: 5 is the quotient
Step 02: 5 + 1 = 6 is the remainder
Answer:
Quotient = 5;
Remainder = 6
```

Fig. 19 Start learning new homework trick
Though the below screenshot looks static, Tux will actually explain her friend
step by step on every single tap achieved by game animation.
Fig. 20 Tux explaining a new trick step by step using animations

Fig. 21 Tux explaining a new trick step by step using animations Fig. 22 Tux explaining an example

```
Trick 13: Find the sum of any 3 x 3 matrix in a calendar
To find the sum of all numbers in any mentioned square, multiply the middle
element by 9.
Example:
9 * 9 = 81 (We shall let kids to search and find why is this true ? Few
miscellaneous tricks like this can be used to make the play very interesting )
```

Fig. 23 Score board

As the user helps Tux to complete her homeworks, he/she will receive lollipops from Tux. These lollipops can be used to unlock new tricks with higher complexity.

#### Calculator challenge:

In this challenge, Tux will use a calculator to find the answers while the user will use the math tricks learned so far to find the answer. The winner will get too many lollipops ;)

By the end of this challenge, user can view an analysis report giving insights on his/her math speed compared with various other parameters. Fig. 24 Calculator challenge

Fig. 25 Calculator challenge Fig. 26 Analysis report compared with average speed

### Implementation of games:

I wish to implement 10 (+3) math tricks as games in a cross platform app using the following technologies.

- HTML5, CSS3, JavaScript
- Phaser game framework (version 2.4.6)
- Polymer (version 1.0) to achieve material design.

This needs to be discussed with the mentors as it should abode the standards of the Sugar labs community. I do have an intermediate - advanced knowledge of all the above mentioned technologies.

### Timeline:

If accepted as a student under SugarLabs organization in GSoC 2017, I plan to spend about 40 - 45 hours/week in my summer vacation to complete the project in time. As i do not have any other commitments from May 30th to August 15th, I can put in some extra time to complete the project in any case of difficulties. I will also commit my code at least twice in a day for the mentors to review. I am also willing to post my work updates during the GSoC period in the GitHub wiki so that the developers can see through the progress. I will also be very glad to contact the mentor at his/her convenient time to report my progress via mail or Hangout chat. I may not be able to attend a hangout video chat during the community bonding period as i stay in Hostel and use University library for the internet connection. During vacations, I will be at home and will have a steady internet connection.

Before GSoC application deadline:

- Do research on the project idea.
- Document the additional tricks to be implemented in the future by any

contributors.

- Design the application layout and request suggestions from mentors.
- Make a draft proposal.

Community bonding period:

- Set up the repository with the recommended web activity sugar

architecture

- Request suggestions/feedbacks from mentors and improve the UI/UX of

the app

- Work more on designing the games and make it more interesting.

GSoC coding period:

Week 01 (May 28 – June 3 ):

- Finalize the design layouts and get that approved from the mentor
- Gather necessary requirements for the development.
- Design the logic for Trick 01 in Homeworks game.

Week 02 (June 4 - June 10):

- Complete the first trick as game.
- Design the logic of second game.
- I will progress and speed up my development.

Week 03 (June 11 - June 17):

- Complete the second game.
- As we have two games developed, we shall start developing the activity

modules corresponding to the games.

- Implement the calculator challenge with selective random questions from

the two logics developed before.

Week 04 (June 18 - June 24):

- Design the logic and develop the third game

30

- Add the third game with the HomeWork challenge and Calculator

challenge.

- As we have three games, develop the tricks list feature in the app where

you can view the list of tricks.

Week 04 (June 25 – July 1 )

- Design the logic and develop the fourth game
- Add and verify all the developed games into the 2 game sections
- Do a testing on developed games and document the code.
- Submit for Mid-Term evaluation before June 28
- Request constructive critical comments from mentors and improve the

games.

- Design the logic and develop fifth game

Week 05 (July 02 - July 08 ):

- Develop the other modules of the app with only 5 games

Week 07 (July 9 - July 15 ):

- Wrap the developed app with 5 games and test it in different platforms.
- Design the logic and develop the sixth game.
- Add the games into the app

Week 08 (July 16 - July 23 ):

- Design the logic and develop the seventh and eighth game.
- Add the games into the app

Week 09 (July 24 - July 30 ):

- Design the logic and develop the ninth and tenth game.
- Add the games into the app.
- Submit for Second-Mid-Term evaluation before July 28
- Request constructive critical comments from mentors and improve the

games.

Week 10 (July 31 - August 06 ):

- Buffer period to complete any pending tasks.

Week 11 (August 07 - August 13 ):

- Complete any remaining task that are left to be done.
- Test the app with all the 10 games in all the available platforms.
- Document the code
- Prepare for final submission.
- Make it compatible with the sugar platform

Week 12 (August 20 - August 26 ):

- Make it compatible with the sugar platform and inform it to the community

and receive feedback and make final iterations on it.

After GSoC period:

- Document and explain the list of remaining tricks and make it available to

any contributors. This will save their time on researching for new tricks.

Finally: I am very much interested in this idea. I have spent all my time in researching on this idea.

To answer few other general questions in brief,

- This is my first GSoC.
- I am applying only to SugarLabs organization.

If accepted as a student developer in GSoC 2017 under Sugar Labs organization, I promise to do my best to complete the project within the allotted time frame and earn appreciation.