ITI (Trade - COPA) Day-23

ITI COPA (Computer Operator & Programming Assistant) – Basic Notes

TOPIC- PROGRAMMING LANGUAGE – PYTHON


1. Introduction to Programming Languages

A programming language is a formal language used to give instructions to a computer so that it can perform specific tasks. Programming languages help humans communicate with computers.

Types of Programming Languages

  1. Low-Level Languages

    • Machine Language

    • Assembly Language

  2. High-Level Languages

    • C, C++, Java, Python, JavaScript

Python is a high-level, interpreted, and general-purpose programming language.


2. Introduction to Python

2.1 What is Python?

Python is a popular, easy-to-learn, high-level programming language used for:

  • Software development

  • Web development

  • Data analysis

  • Artificial Intelligence

  • Automation

  • Machine learning

Python focuses on readability and simplicity, making it ideal for beginners.


2.2 History of Python

  • Python was created by Guido van Rossum

  • First released in 1991

  • Named after the TV show “Monty Python’s Flying Circus”

  • Developed at CWI (Centrum Wiskunde & Informatica), Netherlands

Major Python Versions

  • Python 1.x – Early version

  • Python 2.x – Improved version (now discontinued)

  • Python 3.x – Latest and widely used version


2.3 Why Python is Popular

  • Simple syntax

  • Easy to learn

  • Large standard library

  • Open source

  • Platform independent


3. Features of Python

  1. Simple and Easy to Learn

  2. Interpreted Language

  3. High-Level Language

  4. Object-Oriented

  5. Portable

  6. Open Source

  7. Large Library Support

  8. Dynamic Typing

  9. Extensible

  10. Supports Multiple Programming Paradigms


4. Setting up Python and PATH

4.1 Installing Python

Steps:

  1. Download Python from official website

  2. Run installer

  3. Select “Add Python to PATH”

  4. Install

4.2 Setting PATH

PATH allows the system to recognize Python commands from any directory.

Check installation:

python --version

5. Python Basic Syntax

5.1 Python Syntax Rules

  • Python uses indentation instead of braces

  • Code blocks are defined by indentation

  • Statements end without semicolons

Example:

if 10 > 5: print("10 is greater")

6. Comments in Python

Comments are used to explain code and are ignored by Python.

Types of Comments

  1. Single-line Comment

# This is a comment
  1. Multi-line Comment

""" This is a multi-line comment """

7. Variables in Python

A variable is a container used to store data.

Rules for Variable Naming

  • Must start with a letter or underscore

  • Cannot start with a number

  • Case-sensitive

  • No special symbols

Example:

x = 10 name = "Python"

8. Data Types in Python

Python has several built-in data types.

8.1 Numeric Data Types

  • int (integer)

  • float (decimal)

  • complex

Example:

a = 10 b = 3.5

8.2 Text Data Type

  • str (string)

Example:

name = "ITI COPA"

8.3 Boolean Data Type

  • bool (True or False)

Example:

is_pass = True

8.4 Sequence Data Types

  • list

  • tuple

  • range


8.5 Set Data Type

  • set


8.6 Mapping Data Type

  • dictionary


9. Type Casting in Python

Type casting means converting one data type into another.

Types of Casting

  • int()

  • float()

  • str()

Example:

x = int(5.7) y = str(10)

10. Strings in Python

A string is a sequence of characters.

Creating Strings

s = "Python"

String Operations

  • Concatenation

  • Repetition

  • Indexing

  • Slicing

Example:

print(s[0]) print(s[0:3])

11. Boolean in Python

Boolean represents:

  • True

  • False

Used in conditions and comparisons.

Example:

a = 10 b = 5 print(a > b)

12. Python Operators

12.1 Arithmetic Operators

  • +, -, *, /, %, **, //


12.2 Comparison Operators

  • ==, !=, >, <, >=, <=


12.3 Logical Operators

  • and, or, not


12.4 Assignment Operators

  • =, +=, -=


12.5 Membership Operators

  • in, not in


12.6 Identity Operators

  • is, is not


13. Conditional Statements

Used to make decisions.

13.1 if Statement

if a > b: print("A is greater")

13.2 if-else Statement

if a > b: print("A") else: print("B")

13.3 if-elif-else Statement

if x == 1: print("One") elif x == 2: print("Two") else: print("Other")

14. Looping in Python

Loops are used to repeat code.


14.1 while Loop

i = 1 while i <= 5: print(i) i += 1

14.2 for Loop

for i in range(5): print(i)

15. Control Statements

  • break

  • continue

  • pass


16. String Manipulation

Common string methods:

  • upper()

  • lower()

  • replace()

  • split()

  • find()


17. Lists

A list is a collection of items.

Example:

mylist = [1, 2, 3, "Python"]

Operations:

  • append()

  • remove()

  • pop()

  • sort()


18. Tuple

A tuple is similar to list but immutable.

Example:

t = (1, 2, 3)

19. Sets

A set is an unordered collection of unique items.

Example:

s = {1, 2, 3}

20. Dictionaries

A dictionary stores data in key-value pairs.

Example:

student = {"name": "Ram", "age": 20}

21. Arrays

Arrays store elements of same data type.

Using array module:

import array a = array.array('i', [1,2,3])

22. Iterators

An iterator is an object that can be iterated.

Example:

mytuple = (1,2,3) for i in mytuple: print(i)

23. Modules in Python

A module is a file containing Python code.

Using a Module

import math print(math.sqrt(16))

24. Date and Time

Using datetime module:

import datetime print(datetime.datetime.now())

25. Math Module

Common functions:

  • sqrt()

  • pow()

  • ceil()

  • floor()


26. Input and Output

Input

name = input("Enter name: ")

Output

print(name)

MCQ QUESTIONS (50) – CBT EXAM

  1. Python is a ______ level language.
    A) Low
    B) Medium
    C) High
    D) Machine
    Ans: C

  2. Python was developed by:
    A) Dennis Ritchie
    B) James Gosling
    C) Guido van Rossum
    D) Bjarne Stroustrup
    Ans: C

  3. Python was released in:
    A) 1985
    B) 1991
    C) 2000
    D) 2010
    Ans: B

  4. Python is:
    A) Compiled
    B) Interpreted
    C) Assembled
    D) Machine
    Ans: B

  5. Which symbol is used for comments?
    A) //
    B) #
    C) /* */
    D) <!-- -->
    Ans: B

  6. Which is not a Python data type?
    A) int
    B) float
    C) char
    D) string
    Ans: C

  7. Python variables are:
    A) Fixed type
    B) Dynamic
    C) Static
    D) Constant
    Ans: B

  8. Which is correct Boolean value?
    A) true
    B) TRUE
    C) False
    D) false
    Ans: C

  9. Which operator is used for power?
    A) ^
    B) **
    C) //
    D) %
    Ans: B

  10. Which loop is entry-controlled?
    A) do-while
    B) for
    C) repeat
    D) switch
    Ans: B

  11. break statement is used to:
    A) Skip iteration
    B) Exit loop
    C) Continue loop
    D) Restart loop
    Ans: B

  12. continue statement is used to:
    A) Exit loop
    B) Skip iteration
    C) Stop program
    D) Break function
    Ans: B

  13. List is:
    A) Immutable
    B) Mutable
    C) Fixed
    D) Constant
    Ans: B

  14. Tuple is:
    A) Mutable
    B) Immutable
    C) Dynamic
    D) Editable
    Ans: B

  15. Set stores:
    A) Duplicate values
    B) Unique values
    C) Ordered values
    D) Indexed values
    Ans: B

  16. Dictionary stores data in:
    A) List
    B) Table
    C) Key-value pair
    D) Array
    Ans: C

  17. Which module is used for math operations?
    A) calc
    B) math
    C) number
    D) numeric
    Ans: B

  18. sqrt() function is in:
    A) array
    B) math
    C) datetime
    D) sys
    Ans: B

  19. Which function is used for input?
    A) read()
    B) scan()
    C) input()
    D) get()
    Ans: C

  20. Which function is used for output?
    A) echo()
    B) print()
    C) show()
    D) display()
    Ans: B

  21. range() is used in:
    A) while
    B) for
    C) if
    D) switch
    Ans: B

  22. Python uses indentation for:
    A) Comments
    B) Loop
    C) Block of code
    D) Variables
    Ans: C

  23. Which operator checks membership?
    A) is
    B) in
    C) ==
    D) not
    Ans: B

  24. Which is not a loop?
    A) for
    B) while
    C) repeat
    D) do
    Ans: C

  25. Arrays store elements of:
    A) Different types
    B) Same type
    C) Any type
    D) No type
    Ans: B

  26. Python is:
    A) Closed source
    B) Paid
    C) Open source
    D) Licensed
    Ans: C

  27. Which data type stores text?
    A) int
    B) float
    C) str
    D) bool
    Ans: C

  28. Which operator is logical AND?
    A) &
    B) and
    C) &&
    D) AND
    Ans: B

  29. Python supports:
    A) OOP only
    B) Procedural only
    C) Multiple paradigms
    D) None
    Ans: C

  30. Which module handles date and time?
    A) time
    B) calendar
    C) datetime
    D) clock
    Ans: C

  31. Python is used for:
    A) Web
    B) Data analysis
    C) AI
    D) All
    Ans: D

  32. Python file extension is:
    A) .pt
    B) .py
    C) .pyt
    D) .pn
    Ans: B

  33. Python variables are created when:
    A) Declared
    B) Assigned
    C) Defined
    D) Typed
    Ans: B

  34. Which keyword is used for conditions?
    A) when
    B) if
    C) check
    D) case
    Ans: B

  35. elif is used when:
    A) Multiple conditions
    B) Looping
    C) Input
    D) Output
    Ans: A

  36. pass statement does:
    A) Stops program
    B) Skips loop
    C) Does nothing
    D) Ends function
    Ans: C

  37. Which is mutable?
    A) tuple
    B) string
    C) list
    D) int
    Ans: C

  38. pop() is used in:
    A) tuple
    B) set
    C) list
    D) string
    Ans: C

  39. Dictionary keys must be:
    A) Mutable
    B) Immutable
    C) List
    D) Set
    Ans: B

  40. Iteration means:
    A) Execution
    B) Looping
    C) Condition
    D) Input
    Ans: B

  41. Module is:
    A) Variable
    B) File
    C) Class
    D) Loop
    Ans: B

  42. import keyword is used for:
    A) Output
    B) Module
    C) Loop
    D) Input
    Ans: B

  43. Which operator is floor division?
    A) /
    B) %
    C) //
    D) **
    Ans: C

  44. Python code is executed:
    A) Line by line
    B) Block by block
    C) At once
    D) Randomly
    Ans: A

  45. Which is correct list?
    A) {1,2,3}
    B) (1,2,3)
    C) [1,2,3]
    D) <1,2,3>
    Ans: C

  46. Which is a set?
    A) [1,2]
    B) (1,2)
    C) {1,2}
    D) <1,2>
    Ans: C

  47. Python supports automation because it is:
    A) Fast
    B) Simple
    C) Powerful
    D) All
    Ans: D

  48. Which function returns length?
    A) size()
    B) count()
    C) len()
    D) total()
    Ans: C

  49. Python is best for beginners because:
    A) Complex syntax
    B) Simple syntax
    C) Slow
    D) Old
    Ans: B

  50. Python is widely used in:
    A) AI
    B) ML
    C) Data Science
    D) All
    Ans: D

ITI (Trade-COPA) Day- 22

ITI COPA (Computer Operator & Programming Assistant) – Basic Notes

TOPIC- INTRODUCTION TO CLOUD COMPUTING


1. Introduction to Cloud Computing

1.1 Meaning of Cloud Computing

Cloud Computing is a technology that allows users to store, access, manage, and process data and applications over the Internet instead of using a local computer or local server.

In simple words, cloud computing means using computer resources (like storage, software, servers, and databases) through the Internet.

Example:

  • Google Drive

  • Gmail

  • Microsoft OneDrive

  • Dropbox

  • Amazon Web Services (AWS)


1.2 Why Cloud Computing is Needed

Earlier, organizations had to:

  • Buy expensive servers

  • Maintain hardware

  • Install software manually

  • Hire IT staff for maintenance

Cloud computing removes these problems by providing on-demand services through the Internet.


1.3 Characteristics of Cloud Computing

  1. On-Demand Self-Service

    • Users can use services whenever needed.

  2. Broad Network Access

    • Accessible via Internet from anywhere.

  3. Resource Pooling

    • Resources are shared among users.

  4. Rapid Elasticity

    • Resources can be increased or decreased easily.

  5. Measured Service

    • Pay only for what you use.


2. Benefits of Cloud Services

Cloud computing provides many benefits to individuals, businesses, and organizations.


2.1 Cost Saving

  • No need to buy hardware or software

  • Reduced maintenance cost

  • Pay-as-you-use model


2.2 Scalability

  • Easy to increase or decrease resources

  • Suitable for growing businesses


2.3 Accessibility

  • Access data anytime, anywhere

  • Supports remote work


2.4 Backup and Recovery

  • Automatic data backup

  • Easy disaster recovery


2.5 Security

  • Advanced security measures

  • Data encryption and access control


2.6 Automatic Updates

  • Software updates handled by cloud provider

  • No manual installation required


2.7 Collaboration

  • Multiple users can work on same data

  • Real-time collaboration


3. Categories (Types) of Cloud Computing

Cloud computing can be categorized based on deployment models and service models.


3.1 Deployment Models of Cloud

1. Public Cloud

  • Services provided over the public Internet

  • Owned by third-party providers

  • Example: Google Cloud, AWS

Advantages:

  • Low cost

  • High scalability

Disadvantages:

  • Less control over data


2. Private Cloud

  • Cloud infrastructure dedicated to one organization

  • More secure and controlled

Advantages:

  • High security

  • Customization

Disadvantages:

  • High cost


3. Hybrid Cloud

  • Combination of public and private cloud

  • Data shared between them

Advantages:

  • Flexibility

  • Balanced cost and security


4. Community Cloud

  • Shared by multiple organizations

  • Common objectives


3.2 Service Models of Cloud

1. Infrastructure as a Service (IaaS)

  • Provides virtual machines, storage, and networking

  • User controls operating system and applications

Example: AWS EC2


2. Platform as a Service (PaaS)

  • Provides platform for application development

  • No need to manage hardware

Example: Google App Engine


3. Software as a Service (SaaS)

  • Software delivered through Internet

  • No installation required

Example: Gmail, Google Docs


4. Resources Available in Cloud

Cloud provides various resources that users can access.


4.1 Storage Resources

  • Cloud storage for files and data

  • Example: Google Drive, OneDrive


4.2 Computing Resources

  • Virtual machines

  • Processing power (CPU, RAM)


4.3 Networking Resources

  • Virtual networks

  • Load balancers

  • Firewalls


4.4 Databases

  • Cloud-based databases

  • Example: Amazon RDS


4.5 Software and Applications

  • Email services

  • Office applications

  • ERP software


4.6 Development Tools

  • IDEs

  • Testing tools

  • Deployment tools


5. Introduction to Application Development Life Cycle

5.1 Meaning of ADLC

The Application Development Life Cycle (ADLC) is a step-by-step process used to develop software or applications in a systematic and organized manner.

It defines:

  • How applications are planned

  • How they are designed

  • How they are developed

  • How they are tested

  • How they are maintained


6. Phases of Application Development Life Cycle

The ADLC consists of six main phases.


6.1 Phase 1 – Requirement Analysis

Description

  • Understanding user requirements

  • Gathering information about application needs

Activities

  • User interviews

  • Requirement documentation

  • Feasibility study

Roles Involved

  • Business Analyst

  • Client

  • Project Manager


7. Phases of Application Development Life Cycle

The ADLC consists of six main phases.


7.1 Phase 1 – Requirement Analysis

Description

  • Understanding user requirements

  • Gathering information about application needs

Activities

  • User interviews

  • Requirement documentation

  • Feasibility study

Roles Involved

  • Business Analyst
    Client
    Project Manager

7.2 Phase 2 – System Design

Description

  • Planning the structure of the application

Activities

  • Designing user interface

  • Database design

  • System architecture

Roles Involved

  • System Designer

  • Architect

  • Senior Developers


7.3 Phase 3 – Development (Coding)

Description

  • Actual coding of application

Activities

  • Writing program code

  • Using programming languages

  • Version control

Roles Involved

  • Software Developers

  • Programmers


7.4 Phase 4 – Testing

Description

  • Checking application for errors and bugs

Activities

  • Unit testing

  • Integration testing

  • System testing

Roles Involved

  • Test Engineers

  • Quality Assurance (QA) Team


7.5 Phase 5 – Deployment

Description

  • Application is released for use

Activities

  • Installation

  • Configuration

  • User training

Roles Involved

  • Deployment Engineer

  • System Administrator


7.6 Phase 6 – Maintenance

Description

  • Ongoing support and updates

Activities

  • Bug fixing

  • Performance improvement

  • Feature updates

Roles Involved

  • Support Team

  • Maintenance Engineers


8. Importance of ADLC

  • Improves software quality

  • Reduces development cost

  • Ensures timely delivery

  • Provides clear structure

  • Reduces risk


9. Relation between Cloud Computing and ADLC

  • Cloud platforms support application development

  • Cloud provides testing and deployment tools

  • Reduces infrastructure cost

MCQ Questions (50) – CBT Exam Pattern

1. Cloud computing uses:

A) Local computer
B) Internet
C) Printer
D) Scanner
Ans: B

2. Cloud allows access to data:

A) Offline only
B) Anywhere
C) Only office
D) Only home
Ans: B

3. Google Drive is an example of:

A) Hardware
B) Cloud storage
C) Antivirus
D) OS
Ans: B

4. Pay-as-you-use means:

A) Fixed cost
B) Pay for usage
C) Free service
D) No payment
Ans: B

5. Which is NOT a cloud benefit?

A) Scalability
B) High cost hardware
C) Accessibility
D) Backup
Ans: B

6. Public cloud is owned by:

A) User
B) Government
C) Third-party provider
D) Private company only
Ans: C

7. Private cloud is best for:

A) Security
B) Low cost
C) Public use
D) Gaming
Ans: A

8. Hybrid cloud is a mix of:

A) LAN and WAN
B) Public and Private
C) Hardware and software
D) OS and apps
Ans: B

9. IaaS provides:

A) Software only
B) Platform only
C) Infrastructure
D) Database only
Ans: C

10. Gmail is an example of:

A) IaaS
B) PaaS
C) SaaS
D) DBaaS
Ans: C

11. Cloud storage stores:

A) Hardware
B) Data
C) Printer
D) Cable
Ans: B

12. Virtual machines are part of:

A) Storage
B) Computing resources
C) Software
D) Printer
Ans: B

13. Cloud networking includes:

A) Firewall
B) Load balancer
C) Virtual network
D) All of the above
Ans: D

14. ADLC stands for:

A) Application Data Life Cycle
B) Application Development Life Cycle
C) Advanced Development Logic Control
D) Automated Design Life Cycle
Ans: B

15. First phase of ADLC is:

A) Design
B) Testing
C) Requirement analysis
D) Coding
Ans: C

16. Requirement analysis involves:

A) Coding
B) Testing
C) Understanding user needs
D) Deployment
Ans: C

17. System design phase defines:

A) Bugs
B) Structure
C) Payment
D) Marketing
Ans: B

18. Coding is done in:

A) Design phase
B) Development phase
C) Testing phase
D) Maintenance phase
Ans: B

19. Testing phase checks:

A) Speed only
B) Errors
C) Cost
D) Hardware
Ans: B

20. Deployment means:

A) Writing code
B) Installing application
C) Designing UI
D) Testing
Ans: B

21. Maintenance phase includes:

A) Bug fixing
B) Updates
C) Support
D) All of the above
Ans: D

22. Developer role is mainly in:

A) Requirement phase
B) Development phase
C) Deployment phase
D) Audit phase
Ans: B

23. QA team works in:

A) Coding
B) Testing
C) Deployment
D) Maintenance
Ans: B

24. Cloud helps ADLC by:

A) Increasing cost
B) Providing tools
C) Removing testing
D) Delaying deployment
Ans: B

25. Cloud computing reduces:

A) Flexibility
B) Cost
C) Security
D) Speed
Ans: B

26. SaaS users do not need to:

A) Use internet
B) Install software
C) Login
D) Pay
Ans: B

27. Which cloud model offers highest control?

A) Public
B) Private
C) Hybrid
D) Community
Ans: B

28. Resource pooling means:

A) Separate resources
B) Shared resources
C) Fixed resources
D) Offline resources
Ans: B

29. Rapid elasticity means:

A) Slow scaling
B) Fixed size
C) Easy scaling
D) No scaling
Ans: C

30. Measured service refers to:

A) Free service
B) Pay per use
C) Unlimited use
D) No billing
Ans: B

31. Cloud backup helps in:

A) Data loss
B) Data recovery
C) Data theft
D) Data corruption
Ans: B

32. Collaboration in cloud means:

A) Single user work
B) Multiple users work together
C) Offline work
D) No sharing
Ans: B

33. Application life cycle ensures:

A) Random development
B) Structured development
C) No planning
D) No testing
Ans: B

34. Project manager is involved in:

A) Requirement phase
B) Design phase
C) All phases
D) Maintenance only
Ans: C

35. System administrator works mainly in:

A) Deployment
B) Coding
C) Testing
D) Analysis
Ans: A

36. Cloud computing supports:

A) Digital India
B) Manual records
C) Offline services
D) Typewriters
Ans: A

37. Community cloud is shared by:

A) One user
B) One company
C) Multiple organizations
D) Public
Ans: C

38. Database in cloud is an example of:

A) Hardware
B) Resource
C) Malware
D) Threat
Ans: B

39. ADLC reduces:

A) Software quality
B) Risk
C) Security
D) Control
Ans: B

40. Application updates are part of:

A) Testing
B) Maintenance
C) Deployment
D) Design
Ans: B

41. Cloud development tools help in:

A) Coding
B) Testing
C) Deployment
D) All of the above
Ans: D

42. Cloud users need:

A) Internet connection
B) Printer
C) Scanner
D) Cable
Ans: A

43. Cloud computing is useful for:

A) Students
B) Business
C) Government
D) All of the above
Ans: D

44. Application testing ensures:

A) Security
B) Correct working
C) Fast internet
D) Backup
Ans: B

45. ADLC improves:

A) Cost only
B) Quality only
C) Efficiency and quality
D) Delay
Ans: C

46. Cloud service provider example is:

A) Google
B) AWS
C) Microsoft Azure
D) All of the above
Ans: D

47. Virtualization is related to:

A) Cloud
B) Printer
C) Scanner
D) Keyboard
Ans: A

48. Cloud enables remote work because of:

A) Internet access
B) Hardware
C) Printer
D) UPS
Ans: A

49. ADLC phases are:

A) Optional
B) Fixed and systematic
C) Random
D) Ignored
Ans: B

50. Cloud computing is future technology because:

A) Cost saving
B) Scalability
C) Flexibility
D) All of the above
Ans: D

ITI (Trade - COPA) Day-23

ITI COPA (Computer Operator & Programming Assistant) – Basic Notes TOPIC- PROGRAMMING LANGUAGE – PYTHON 1. Introduction to Programming...