Page 135 - Computer Genius Class 07
P. 135
Notes
To change the view to textual mode choose
Text view from View drop-down menu.
Addition Using Textual Coding
To calculate the sum of numbers in AI Connect, create a project, in it create an activity. Then, follow
the given steps to do textual coding:
Here, we add four numbers, 3, 8, 9, 10. We can change values for other calculations.
Step 1 Create a variable 'A'.
This variable will store the sum of 4 integers 3,8,9 and 10. We will use “+” arithmetic
operator to add the num ers and define the type as int.
Step 2 Print the sum of numbers using the following code.
(Here, “Answer is” is a string and “A” is a variable.)
OUTPUT:
Arithmetic Operators in Textual Coding
To use arithmetic operators in textual coding in AI Connect, create a project, in it create an activity.
Then, follow the given steps to do textual coding:
(Here, we use the condition where you have 13 bamboo loops, and your friend have 15 bamboo loops.
You both try to test your mathematical skills and perform the addition, subtraction, multiplication
and division using textual coding.)
Step 1 Create a variable 'You' and assign value 13. Then print the number of bamboo loops you
have after converting it into integer.
Step 2 In the same add one more variable 'your_friend' and assign value 15. Then print the
number after converting it into integer.
Textual Coding 133

