Important Work Sheet
Important Work Sheet
Important Work Sheet
Name - _________________________
Date – 11-December-2024
1. Examples of AI:
o AI in self-driving cars: AI systems help in making
decisions and controlling the car.
o Human Brain is not AI, though it inspires AI models.
2. Python Keywords:
o def: Used to define a function in Python.
o else: Executes when the condition in if is false.
3. Python Expressions:
o Understand operator precedence. 3 * 5 is calculated
before adding 2.
o Example: 2 + 3 * 5 gives 17.
4. AI Types:
o Types of AI: Reactive machines, Limited memory, Self-
aware AI, and Machine Learning.
5. Domains of AI:
o AI domains: NLP (Natural Language Processing),
Computer Vision, etc. Information is not a domain of
AI.
6. Python Features:
o Python is an interpreted language (not compiled).
o Loops and other features are fully supported.
7. Python for Input/Output:
o Use input() to get user input.
o Use print() for output.
8. Data Types in Python:
o len("Hello") returns an integer (length of string).
9. AI Definition:
o Artificial Intelligence (AI): The simulation of human
intelligence by machines.
10. Model Evaluation in AI:
In the AI Project Cycle, Model Evaluation means testing the
performance of the trained model.
sum = 0
for i in range(1, 11):
sum += i
print(sum)
2. Even or Odd Check:
o Use if-else to check divisibility by 2.
python
num = int(input())
if num % 2 == 0:
print("Even")
else:
print("Odd")
3. Flowchart and Algorithm:
o Ensure you understand basic flowchart symbols and their
meaning.
o Example: A flowchart will use decisions (diamond),
processes (rectangles), and connectors (arrows).
4. Find Largest of Three Numbers:
o Use if-elif-else to compare the three numbers.
python
a = int(input())
b = int(input())
c = int(input())
if a >= b and a >= c:
print("Largest:", a)
elif b >= c:
print("Largest:", b)
else:
print("Largest:", c)
5. Find Greater Value Between -12, 15, 17:
o Compare numbers and find the greatest.
python
1. Input age
2. If age >= 18, print "Eligible"
3. Else, print "Not Eligible"
5. Flowchart for Driving License:
o A flowchart for eligibility includes decision points based
on age input.
num = int(input())
if num > 0:
print("Positive")
else:
print("Negative")
6. Sequential Flow:
o Code runs in a specific sequence, one step after the other.
o Example: Calculating the area of a rectangle:
python
length = 5
width = 3
area = length * width
print(area)
7. Prime Number Program:
o Check if a number is prime:
python
num = int(input())
if num > 1:
for i in range(2, num):
if num % i == 0:
print("Not prime")
break
else:
print("Prime")
else:
print("Not prime")
Self Test - 2
Section A: Multiple Choice Questions (MCQs)
1. Which of the following is an example of Artificial Intelligence?
o a) Human brain
o b) Self-driving car
o c) Computer mouse
o d) Television
2. What is the keyword used to define a function in Python?
o a) function
o b) define
o c) def
o d) func
3. What will be the output of the following code in Python?
python
print(2 + 3 * 5)
o a) 25
o b) 17
o c) 15
o d) 12
4. Which of the following is NOT a type of Artificial Intelligence?
o a) Reactive machines
o b) Limited memory
o c) Self-aware AI
o d) Machine Learning
5. Which of the following is NOT a domain of AI?
o a) Data
o b) Computer Vision
o c) NLP (Natural Language Processing)
o d) Information
6. What is one of the features of Python?
o a) Python is a compiled language
o b) Python is an interpreted language
o c) Python does not support loops
o d) Python is only used for web development
7. Which function is used to take user input in Python?
o a) input()
o b) get()
o c) read()
o d) user()
8. What is the return type of the following expression in Python?
python
len("Hello")
o a) String
o b) Boolean
o c) Integer
o d) List
9. Which of the following refers to the simulation of human
intelligence by machines?
o a) Intelligence
o b) Processing the data
o c) Artificial Intelligence
o d) Machine
10. In the AI Project Cycle, what does 'Model Evaluation' mean?
a) Collecting more data
b) Testing the performance of the AI model
c) Pre-processing the data
d) Making predictions
Section B: True and False
1. AI systems can perform tasks that typically require human
intelligence.
True/False
2. In Python, the 'else' block is executed when the condition in an
'if' statement is true.
True/False
3. In the AI Project Cycle, "Model Deployment" refers to putting
the trained model into production.
True/False
4. Python does not support object-oriented programming (OOP).
True/False
5. Data Pre-processing is the final step in the AI Project Cycle.
True/False
python
print(2 + 3 * 5)
python
len("Hello")
python
total = 0
for i in range(1, 11):
total += i
print("Sum of the first 10 natural numbers:", total)
python
python
python
python
x = 5 # int
y = 3.5 # float
z = 2 + 3j # complex
python
my_list = [1, 2, 3]
my_tuple = (4, 5, 6)
my_string = "Hello"
python
python
num = int(input("Enter a number: "))
if num > 0:
print("The number is positive.")
elif num < 0:
print("The number is negative.")
else:
print("The number is zero.")
python
print("Start")
print("Next step")
print("End")
python