Computational Thinking Content
# LOGIC

# Logic 1: a > b , b>c , which is greater between a and c ?
# BOOLEAN Logic – will result in boolean values – 0 (False) or 1 (True)
# AND (multiplication) OR (addition) NOT (opposite)

# prediction: Rohit and Ishaan will open the batting for India today
# actual: Rohit and Gill opened the batting
”’
# AND
True and True: True
True and False: False
False and True: False
False and False: False
”’
# prediction: Rohit or Ishaan will open the batting for India today
# actual: Rohit and Gill opened the batting
”’
# OR
True or True: True
True or False: True
False or True: True
False or False: False
”’
# Logical operator is applied between two conditions

## Conditions – checking a value
# > < <= >= == !=

# Assignment
a = 5 # take a variable a and assign a value 5 to it
print(a)

#Condition
a == 5 #Is the value of a equal to 5 ?? answer will be a bool value: 0 (F) or 1 (T)

a=“hello” #assignment

a,b,c=10,20,10

print(a >b or b>c or b<=c and c>a or a<=b and a>=c or b==c and a==c and a!=c or a<b)
# F or T or F and False or True and True or false and True and False or True
# T

# variables can hold: numeric (integer, float, complex),
# string (text – character & string ), bool (True or False)

# Data types

1/0.00000000000000000000000000000000000000000000000000000 = -infinity
Explain what above flowchart does?
Explain what above flowchart does?

Write detailed steps for making  tea and draw flowchart.

Answer the questions from the below pdf - found on page numbers: 5, 7 and 14

Psuedocode to calculate Netpay with hourly rate and deduction. When gross pay is more
than 100 only then you deduct otherwise deduction is zero


READ name, hourlyRate, hoursWorked
grossPay = hourlyRate * hoursWorked
IF grossPay >= 100
READ deductionRate
deduction = grossPay * deductionRate
ELSE
deduction = 0
ENDIF
netPay = grossPay – deduction
WRITE name, grossPay, deduction, netPay


Calculate NetPay when:

1. If hourly rate is 10 and the person worked for 6 hrs, what is his net pay?
2. If hourly rate is 5 and the person worked for 16 hrs, what is his net pay?
3. If hourly rate is 10 and the person worked for 16 hrs, what is his net pay?
Given that deduction rate is 5%

Next problem: Ask the user their choice of game number and then print, “you have bought game name”
Replace name with below game number:
1. Solitaire
2. Doom
3. Monopoly

Check the highest value among the 3 numbers

Assignment: Read marks in 5 subject, calculate average and assign grades based on average.
Avg > 80: Grade A

Avg > 70: Grade B
Avg > 60: Grade C
Avg > 40: Grade D
Avg < 40: Grade E