Attempt the following. It is important to show your workings (*comments are
accepted.)
Question 1
You are offered two different sales jobs. The first company offers a
straight commission of 6% of the sales. The second company offers a salary
of 390 per week plus 1% of the sales. How much would you have to sell in a
week for the straight commission offer to be at least as good?
Question 2
Two times a number plus three times another number equals 44. Three times
the first number plus four times the other number is 77. Find the numbers.
Question 3
Twelve less than four times a number is the same as six times the number.
How do you find the number?
Question 4
Susana and Lawrence are running on a track. Susana finishes one lap every
5 minutes and Lawrence finishes one lap every 8 minutes. If they both
start at the same time, after how many minutes will they be side by side
again?
Question 5
The difference between two numbers is 20. Three times the smaller number
is 44 more than the larger number. What are the numbers?
Question 6
If eight times a number equals 24 more than two times that number. what is
the number?
Question 7
How do you find the greatest common factor of 20 and 28?
Example1
We define two variables x and y. x = 5 y = 6 print( x + y ) = 11 Result of
print ( x + y ) is 11 Simple right? Let's attempt more examples.
Example2
Let's define two variables a and b. a = 15, b = 34 print( a + b) = 49
Let's do one more...
Example3
x = 3, y = 6
print( x * y ) = 18. Simple math!.
Example4
Let's try something different. Remember variable type String mentioned
above Let's define two String variables x and y. x = "Hello " y = "my name
is Joe" print( x + y ) = ? Let's add the two variables x and y. We'd get:
print( x + y ) = "Hello my name is Joe"
Another example
x = "The capital of Oyo State is ", y = "Ibadan" print( x + y ) = ? Let's
add the two variables x and y. We'd get: print(x + y ) = The capital of
Oyo State is Ibadan
Something to note
Take a look at this example. We have two variables of different types. x
="How old is Tony?", y = 4 print( x + y ) = ? Let's add the two variables
x and y. Result: This is not allowed. (We cannot add two different
variable types).
Why? We can only add variables of the same type. So, in this case.
We can covert y into a String type by simple putting quotes around it
("4") x = "How old is Tony?", y = "4" print( x + y ) = ? Let's add the two
variables x and y. Result: "How old is Tony? 4"
Nothing too difficult right? Now, it's your turn to attempt some questions
Question A
( 10 + 20 ) = ___________
Question B
print ( 40 + 20 ) = ___________
Question C
print ( 34 * 2 ) = ___________
Question D
print ( ____ + ____ ) = 50
Question E
_________ ( ____ * ___ ) = 33
Question F
print ( "We are going to " + "school" ) = ___________
Question G
print ( "We will arrive at " + 2 ) = ______________
Question H
print ( "Number of days in a leap year is " + _____________ ) = "Number
of days in a leap year is 366"