Page 106 - Computer_Genius_v2.1_C7_flipbook
P. 106
Notes
The formula to calculate distance and speed:
Distance = Speed * Time
Speed = Distance/Time
Find the Electricity Bill
To create an AI Connect program to find the electricity bill, create a project. In this project create
a Basic Coding activity. Then follow the given steps:
Here, we followed the given conditions:
l If the meter reading range is 0-100, print “free of cost” on the screen.
l If the meter reading range is 100-200, multiply the count by 5 and print the cost.
l If the meter reading range is above 200 multiply the count by 10 and print the cost.
Step 1 Create the variable “unit” and ask the user for the input.
Block Code
Textual code
Step 2 Use if statement and apply the condition value of unit greater than 0 and less than equal
to 100 using Logical and Relational Operators.
If the above condition is satisfied, “Free of cost” should be printed on the screen.
Block Code
Textual code
104 Computer Genius (V2.1)-VII

