ICT Computer Tuition Class Local Edexcel Cambridge | Python PHP Web Development Student Project Help
ICT Project, Coding, and Digital Marketing Training!
Struggling with your MSc, BIT, BSc, or HND project? Get guaranteed success with our individual/group online classes taught in English, Sinhala, or Tamil.
✅ PHP & Python Software Development and Automation mySQL Oracle
✅ Digital Marketing & E-Commerce Website Development
✅ Freelancing, Database Design, and AI ML Application Training
✅ All Grade ICT Tutorials, Notes, and Exam Prep
ЁЯУЮ WhatsApp +94 729622034 | ЁЯУз Email: ITClassSL@gmail.com
# Get two numbers (Comment)
a = int(input("Enter A: ")) # Input & int type
b = int(input("Enter B: "))
total = a + b # Processing
print(total) # Output
int
age = 18
float
price = 25.50
str
name = "Ali"
bool
passed = True
Operators & Precedence
Arithmetic:+, -, *, /, %, **, //
Relational:>, <, >=, <=, ==, !=
Logical:and, or, not
Precedence Example: result = 2 + 3 * 4 → First 3*4=12, then 2+12=14. (2 + 3) * 4 → Answer = 20
ЁЯФА9.8 Control Structures (Sequence, Selection, Repetition)▼
⭐ Past Paper Pattern (2022 Paper II Q8b) Q: Student name & food item-рой் рооுродро▓் рооро▒்ро▒ுроо் роХроЯைроЪி роОро┤ுрод்родுроХро│் роТро░ே рооாродிро░ிропா роОрой рокро░ிроЪோродிроХ்роХுроо் function.
START
INPUT N
IF N MOD 2 = 0 THEN
OUTPUT "Even"
ELSE
OUTPUT "Odd"
END IF
STOP
2. Pseudocode
READ N
IF N % 2 == 0 THEN
PRINT "Even"
ELSE
PRINT "Odd"
3. Python Code
n = int(input()) if n % 2 == 0: print("Even") else: print("Odd")
4. Flowchart
Start → Input N → Diamond (N%2==0?) → Yes (Even) / No (Odd) → Stop
5. Hand Trace (N=7)
n = 7
n % 2 = 1
Condition (1==0) is False
Output: Odd
ЁЯОУ Expert ICT, Coding, School Classes, Digital Marketing & University Project Guidance
Struggling with your university final year project? Want to master coding, upscale your business with expert digital marketing, or learn absolute computer basics from scratch? We offer high-quality individual and group online classes conducted in English, Sinhala, or Tamil mediums. Get guaranteed academic success and professional growth with tailored guidance.
ЁЯОУ University Final Year Project Guidance & AI
Get specialized, end-to-end mentoring and technical support to pass your degree or master's program with flying colors:
ЁЯПл Targeted Institutes: Expert guidance tailored for BIT UCSC, UoM, SLIIT, NIBM, and other leading universities.
ЁЯФм Postgraduate Support: Comprehensive assistance for MSc Software Final Year Projects.
ЁЯдЦ AI & Smart Applications: Step-by-step implementation of AI, Machine Learning (ML), and automation modules.
✅ Guaranteed Success: Help with documentation, system architecture, coding, and viva preparation.
ЁЯПл School ICT & Corporate Beginner Classes
ЁЯТ╗ Non-IT Staff Computer Basics: Absolute beginner-friendly online classes covering essential computer skills, office tools, and internet operations.
ЁЯОТ Primary & Secondary (Grades 1-10): Interactive online ICT classes tailored to build strong foundations from early ages.
ЁЯУЭ Exam Prep: Dedicated training packages for GCE O/L, GCE A/L ICT, and GIT exams.
ЁЯМН Global Syllabuses: Complete curriculum coverage for Local, Edexcel, and Cambridge in English & Tamil Mediums.
ЁЯУв Software Development & Digital Marketing Services
⚙️ Software & Web Development: Professional custom software application and website development built using PHP & MySQL.
ЁЯОп Social Media Management: Content creation, publishing, and channel management for Facebook, Instagram, TikTok, and YouTube.
ЁЯУИ Ad Boosting: Highly targeted paid advertising campaigns to drive leads, traffic, and sales to your business.
ЁЯУЮ Connect With Us Instantly
Book your slot for online classes or get a premium tech service quote today!
ЁЯРН Python: Comments, Variables, Input & Data Types
Complete Guide with Practice Exercises & Solutions
ЁЯУЪ About this guide: Complete, exam-friendly notes for Python Programming Basics. Learn how to add comments, use variables, capture user input with input(), understand data types (string, integer, float), and practice with real exercises and solutions.
Concept 1
What Are Comments?
Adding comments to code allows you to explain what the code does or to provide extra information about the code. In Python, you start a comment with a hash (#) symbol. Any text on a line after a # symbol will be ignored by the interpreter.
Example
Comments in Action
# This is an Adventure Game about The Digital Sweet Shop
# The program was written by me
#
#
#
# The next few lines give the introduction
print("Welcome to The Digital Sweet Shop")
print()
print("You have been invited to take part in a competition in the shop.")
print("You must find the chocolate room where you will be asked a question.")
print("If you get it right you will receive letters which are part of a password and a clue.")
ЁЯОп Exam Tip: Comments improve code readability and help other programmers (or yourself later) understand what the code does. They are essential for good programming practice!
Concept 2
What is a Variable?
A variable is a named location in the computer's memory that stores data of a particular type. Data can either be assigned to a variable in the program itself, or it can be assigned from input from the user.
name = "Ardeel"
age = 12
address = "Station Road"
colour = "Red"
Concept 3
Printing Variables
To print the contents of a variable, use the print() statement. To combine text and a variable, use a comma (not inside quotation marks).
# Print just the variable
print(name)
# Output: Ardeel
# Combine text and variable
print("Your name is", name)
# Output: Your name is Ardeel
ЁЯФС Keyword:
Variable: A named memory location used to store data of a given type during program execution; a variable can change value as the program runs.
Concept 4
The input() Function
The input() command allows users to enter information into the program and store it in a variable.
name = input("What is your name? ")
print("Hello", name)
Command
Description
input()
Used to take input from a user. If you wish to store this input, you need to assign it to a variable.
Scratch vs Python
Comparison: Scratch Blocks → Python Code
Scratch Blocks
Python Code
when ЁЯЯв clicked
ask What's your name? and wait
set [name ▾] to (answer)
say (join [Hello ] (name))
name = input("What's your name? ")
print("Hello", name)
Practice
Practice Task: Name and Number
Create a program that:
Asks the user to 'Enter your name' and stores it in a variable called name
Asks the user to 'Enter a number between 1 and 10' and stores it in a variable called number
Uses print to create output like this:
Enter your name Khalil
Enter a number between 1 and 10 6
Your name is Khalil and the number you entered was 6
ЁЯТб Solution:
name = input("Enter your name ")
number = input("Enter a number between 1 and 10 ")
print("Your name is", name, "and the number you entered was", number)
Concept 5
What Are Data Types?
Variables can hold different data types. To store data, you must decide on a name and a data type for the variable first.
Data Type
Example
Description
String
'Hello World', 'WE5694MC'
Any textual characters (letters, numbers, symbols)
Integer
24, -10
Any whole number (no decimal point)
Real (Float)
6.98, -0.045
Any number with a decimal point
⚠️ Important: In Python, the data type real is referred to as float. This is short for 'floating point number', which is a decimal number.
Concept 6
Variable Examples
Variable Name
Data Type
Reason
playerage
Integer
Stores a whole number (age in years)
playername
String
Stores letters/text characters
The variable names have been chosen as playerage and playername, but they could have been called anything we wanted.
Concept 7
Input Function & Data Types
To capture data from the user, you use the input() function. The input function captures user input as a string data type. This contains numbers, letters, and symbols.
playername = input("What is your name? ")
print("Welcome", playername)
Examples of string data type: 'Robot', '@password123', '**WWW777'
Keywords
Essential Vocabulary
Data type: The different ways in which data can be stored, e.g., integer, string, decimal number
Integer: Whole number
Real: Any number with a decimal point, such as 1.2 or 56.8
Float: Another name for the data type real; short for 'floating point number'
Input function: A function that Python uses to capture string data from users
String: Data that is made up of letters, numbers, or any characters on the keyboard
ЁЯТб DID YOU KNOW?
Variables are not used just in computer programming; they are used in other applications as well. Spreadsheets make use of variables too, but they are referred to as cell references. Variables are extremely powerful as you can use them to store data and model different scenarios (weather forecasting, financial markets, aerodynamics).
Exercise 1
Rewrite Scratch Programs in Python
Program 1 (Scratch): Ask for a word and display it back
✅ Python Solution:
word = input("Enter a word: ")
print("The word you entered was", word)
Program 2 (Scratch): Ask for age and location
✅ Python Solution:
age = input("How old are you? ")
print("You are", age, "years old")
live = input("Where do you live? ")
print("You live in", live)
Exercise 2
Identify Data Types
Look at the Python code below and identify the data type for each variable:
name = "Maryam"
cardNumber = "0012563943029845"
balance = 145.98
address = "Mall Road"
age = 11
Variable Description
Variable Name
Data Type
Explanation
Name on bank card
name
String
Contains text characters representing a name
Bank card number
cardNumber
String
Stored as text because it contains leading zeros and is not used for calculations
Bank account balance
balance
Float (Real)
Contains a decimal point representing monetary value
Address
address
String
Contains a mix of letters and numbers representing text
Age
age
Integer
Contains a whole number representing years
Exercise 3
Complete the DataTypes.py Program
Edit the code so when it runs, it looks like this:
Name: Maryam
Age: 13
Address: Station Road
Bank Card Number: 0012563943029845
Current Balance: 145.98
✅ Python Solution:
# Updated variables to match final output requirements
name = "Maryam"
cardNumber = "0012563943029845"
balance = 145.98
address = "Station Road"
age = 13
# Output formatting statements
print("Name:", name)
print("Age:", age)
print("Address:", address)
print("Bank Card Number:", cardNumber)
print("Current Balance:", balance)
❓ Frequently Asked Questions (FAQ)
Q: How do you add comments in Python?
A: In Python, you add comments by starting a line with a hash (#) symbol. The Python interpreter ignores any text on a line after the # symbol, making it useful for explaining code or providing extra information.
Q: What is a variable in Python?
A: A variable is a named location in the computer's memory that stores data of a particular type. Data can be assigned to a variable in the program itself or from user input, and it can change value as the program runs.
Q: What does the input() function do in Python?
A: The input() function allows users to enter information into the program. It captures user input as a string data type and stores it in a variable. For example: name = input('What is your name? ')
Q: What are the three main data types in Python?
A: The three main data types are: 1) String - textual characters like 'Hello World', 2) Integer - whole numbers like 24 or -10, 3) Real/Float - numbers with decimal points like 6.98 or -0.045.
Q: Why is a bank card number stored as a string instead of an integer?
A: A bank card number is stored as a string because it contains leading zeros and is not used for mathematical calculations. Storing it as an integer would remove the leading zeros.
ЁЯОУ SRI LANKA ONLINE ICT TRAINING
Expert ICT, Computer Science, Coding & Digital Marketing Classes
Learn ICT, Computer Science, Programming, Web Development and Digital Marketing with practical, career-focused guidance.
Welcome to our Sri Lanka Online ICT & Computer Classes community!
We provide Online Tuition Classes, Home Visit Classes and
Individual / Group Classes for students and professionals.
Whether you are a school student, university student, beginner
programmer or entrepreneur, we help you develop practical IT
skills for education and career growth.
ЁЯТб Explore Our Training & Services
ЁЯОУ University Project Guidance
Technical guidance for university assignments and final-year IT projects.
BIT / BSc / IT / ICT Projects
Final Year Project Guidance
PHP & MySQL Projects
Python & Java Projects
Database & Web Applications
Project Ideas & Documentation
ЁЯдЦ AI, Coding & Software
Develop programming knowledge and practical software development skills.
Python Programming
C & Java Programming
PHP & JavaScript
HTML & CSS
jQuery & AJAX
AI & Smart Applications
ЁЯПл School ICT Classes
Interactive ICT and Computer Science lessons for school students.
Grade 1 – Grade 11
G.C.E. O/L ICT
G.C.E. A/L ICT
GIT Classes
School ICT & Internal Tests
Past Papers & Revision
ЁЯМР Web Design & Development
Build websites and database-driven applications for individuals and businesses.
Website Design
Website Development
WordPress Development
PHP & MySQL
HTML / CSS / JavaScript
Website SEO & Maintenance
ЁЯУв Digital Marketing
Grow your brand online with social media and digital marketing support.
Digital Marketing
Facebook Page Management
Instagram Marketing
TikTok & YouTube
Content Creation & SEO
Facebook Ads & Reels
ЁЯТ╗ Computer & IT Skills
Build essential computer skills from absolute beginner to advanced level.
Computer Fundamentals
MS Word, Excel & PowerPoint
Excel Formulas & Macros
Oracle / MySQL / MS SQL
AWS, Linux & DevOps
Freelancing & IT Skills
ЁЯУЪ Learn With Your Curriculum
Support for Sri Lankan Local Curriculum, Cambridge and Pearson Edexcel programs.
ЁЯЗ▒ЁЯЗ░ Sri Lankan Local Curriculum
Grade 01 – Grade 11 ICT
G.C.E. O/L ICT
G.C.E. A/L ICT
GIT Classes
Term Test Preparation
Model Papers & Notes
English / Sinhala / Tamil Medium
ЁЯУШ Pearson Edexcel
iPrimary Computing
iLowerSecondary Computing
International GCSE ICT
International GCSE Computer Science
GCSE Computer Science
International A Level IT
International A Level Computer Science
ЁЯУЧ Cambridge Curriculum
Cambridge Primary Computing
Cambridge Lower Secondary Computing
Cambridge IGCSE ICT
Cambridge IGCSE Computer Science
Cambridge O Level Computer Science
AS & A Level IT
AS & A Level Computer Science
ЁЯТ╗ Programming & Software Development
ЁЯЫа️ Programming Languages & Technologies
✅ Python Programming
✅ C Programming
✅ Java Programming
✅ PHP Programming
✅ JavaScript
✅ HTML & CSS
✅ jQuery & AJAX
✅ ASP.NET
✅ VB.NET
✅ VB6
✅ MySQL
✅ MS SQL Server
✅ MS Access
✅ Oracle Database
✅ Database Design
✅ SQL Queries
✅ Database Programming
✅ Software Development
ЁЯМР Web Design & Development
✅ Website Design
✅ Website Development
✅ WordPress Website Development
✅ HTML / CSS / JavaScript
✅ PHP & MySQL
✅ WordPress SEO
✅ Website Maintenance
✅ Web Applications
✅ Database-Driven Websites
ЁЯОУ University & Final Year IT Projects
ЁЯзСЁЯТ╗ Project Development
BIT / BSc / IT / ICT Projects
PHP & MySQL Projects
Python Projects
Java Projects
Web Application Projects
Database Projects
ЁЯУД Documentation & Practical
Project Ideas
System Architecture
Database Design
Assignments Guidance
Practical Implementation
Technical Documentation
ЁЯза AI & Smart Applications
AI Application Concepts
Machine Learning Modules
Automation Applications
Step-by-Step Coding
System Implementation
Project Learning Support
ЁЯУК Database, Cloud & IT Training
✅ Oracle Database
✅ MySQL
✅ Microsoft SQL Server
✅ Microsoft Access
✅ Database Design
✅ SQL Queries
✅ AWS Cloud
✅ Linux
✅ UNIX
✅ Windows Server
✅ DevOps
✅ SRE
✅ Automation
✅ Software Testing
✅ Freelancing Skills
ЁЯУ▒ Digital Marketing & Social Media
✅ Digital Marketing
✅ Facebook Page Setup & Management
✅ Instagram Marketing
✅ TikTok Marketing
✅ YouTube Channel Setup
✅ Social Media Management
✅ Content Creation
✅ SEO
✅ Facebook Ads
✅ Instagram Reels
✅ LinkedIn Branding
✅ Social Media Campaign Planning
✅ Hashtag Strategy
✅ Insights & Engagement
ЁЯЦе️ Microsoft Office & Digital Skills
✅ MS Word
✅ MS Excel
✅ MS PowerPoint
✅ Excel Formulas
✅ Excel Automation & Macros
✅ Computer Fundamentals
✅ Digital Literacy
✅ Multimedia Presentations
⭐ Why Join Our Classes?
ЁЯМН
Online & Home Visit Classes
ЁЯСе
Individual & Group Classes
ЁЯЧг️
English / Sinhala / Tamil
ЁЯУЪ
School & University Support
ЁЯУЭ
Past Papers & Model Papers
ЁЯТ╗
Practical Programming
ЁЯЪА
Beginner to Advanced Skills
ЁЯОп
Career-Focused Learning
ЁЯУЮ Ready to Start Learning?
Book your online class or contact us for ICT training,
programming courses, university project guidance and
digital marketing services.
3. CPU роЗрой் рооுроХ்роХிроп роХூро▒ுроХро│் ропாро╡ை?
ро╡ிроЯை:
ALU – Arithmetic and Logic Unit
CU – Control Unit
Registers – рокродிро╡ேроЯுроХро│்
4. ALU роОрой்ро▒ாро▓் роОрой்рой?
ро╡ிроЯை: ALU роОрой்рокродு Arithmetic and Logic Unit роОрой்рокродрой் роЪுро░ுроХ்роХрооாроХுроо். роЗродு роХрогிрод рооро▒்ро▒ுроо் родро░்роХ்роХроЪ் роЪெропро▒்рокாроЯுроХро│ை рооேро▒்роХொро│்ро│ுроо் CPU роЗрой் роТро░ு рокроХுродிропாроХுроо்.
5. ALU роЗрой் рокрогிроХро│் ропாро╡ை?
ро╡ிроЯை:
роХூроЯ்роЯро▓்
роХро┤ிрод்родро▓்
рокெро░ுроХ்роХро▓்
ро╡роХுрод்родро▓்
роТрок்рокிроЯுродро▓்
родро░்роХ்роХроЪ் роЪெропро▒்рокாроЯுроХро│்
6. CU роОрой்ро▒ாро▓் роОрой்рой?
ро╡ிроЯை: CU роОрой்рокродு Control Unit роОрой்рокродрой் роЪுро░ுроХ்роХрооாроХுроо். роЗродு роХрогிройிропிрой் роЪெропро▒்рокாроЯுроХро│ைроХ் роХроЯ்роЯுрок்рокроЯுрод்родி, рокро▓்ро╡ேро▒ு роЕро▓роХுроХро│ுроХ்роХு роХроЯ்роЯро│ைроХро│ை ро╡ро┤роЩ்роХுроХிро▒родு.