0% found this document useful (0 votes)
17 views6 pages

AI & Python Self-Test Answer Key

Uploaded by

ktoshit1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

AI & Python Self-Test Answer Key

Uploaded by

ktoshit1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Class – 9th AI & Python Self-Test Paper Answer Key

Section A: True or False (1 Mark each)

1. True - Artificial Intelligence enables machines to mimic human


behavior.
2. True - Python is a case-sensitive programming language.
3. True - The AI project cycle consists of five stages.
4. False - Python supports the use of loops.
5. False - AI systems can be trained using both supervised and
unsupervised learning methods.
6. False - The if statement in Python is used for conditional
statements, not loops.
7. True - Machine learning is a subset of artificial intelligence.
8. True - A DataFrame is a Python construct used to store multiple
pieces of data in a tabular format.
9. True - AI models can improve over time using new data.
10. False - Comments in Python start with a hash #, not double
slashes //.

Section B: Multiple Choice Questions (MCQs) (1 Mark


each)

1. b) Artificial Intelligence
2. d) main
3. c) for i in range(10):
4. b) Data Acquisition
5. a) .py
6. d) Sorting emails as spam or not spam
7. b) input()
8. b) Creating algorithms to solve problems
9. a) HelloWorld
10. b) Problem Scoping
Section C: Short Answer Questions (3 Marks each)

1. Define Artificial Intelligence in your own words.


Artificial Intelligence refers to the development of computer
systems that can perform tasks typically requiring human
intelligence, such as learning, reasoning, problem-solving, and
decision-making.
2. List any three applications of AI in real life.
o Virtual assistants (e.g., Siri, Alexa)
o Autonomous vehicles (self-driving cars)
o Predictive analytics in healthcare
3. Write a Python program to print the first 5 natural numbers
using a loop.

python

for i in range(1, 6):


print(i)

4. Explain the importance of the "Problem Scoping" stage in


the AI project cycle.
Problem scoping helps define the problem, identify the data
required, and determine the goals of the AI system. It sets the
foundation for the rest of the project, ensuring that the problem
is understood and addressed properly.
5. Differentiate between supervised and unsupervised learning.
o Supervised Learning: The model is trained on labeled
data, where the output is known.
o Unsupervised Learning: The model is trained on
unlabeled data, and it tries to identify patterns or clusters
in the data.
6. What is Python? Mention any two features of Python.
Python is a high-level, interpreted programming language
known for its readability and simplicity.
Features:
o Easy syntax and readability
o Large standard library
7. Explain the role of data in AI and why it is crucial for
modeling.
Data serves as the foundation for AI systems. It is used to train
models, validate their performance, and test their accuracy.
Without proper data, AI models cannot learn or make accurate
predictions.
8. What is the use of indentation in Python?
Indentation is used in Python to define code blocks. It indicates
the grouping of statements and is essential for proper code
structure, especially in loops, conditionals, and functions.
9. Write the output of the following code:

python

x = 10
y = 5
print(x + y)
print(x * y)

Output:

15
50

10. What is the purpose of the print() function in Python?


The print() function is used to display output to the console or
screen. It helps in debugging and showing results to the user.

Section D: Long Answer Questions (5 Marks each)

1. Explain the five stages of the AI project cycle with examples.


o Problem Scoping: Define the problem and goals (e.g.,
predicting house prices).
o Data Acquisition: Collect relevant data (e.g., historical
house prices, area).
o Modeling: Create algorithms to learn from data (e.g.,
linear regression).
o Evaluation: Assess the model's performance (e.g., using
accuracy or error rates).
o Deployment: Implement the model for use in real-world
scenarios (e.g., predicting future house prices).
2. Write a Python program to find whether a number entered
by the user is even or odd.

python

num = int(input("Enter a number: "))


if num % 2 == 0:
print("Even")
else:
print("Odd")

3. Discuss three key differences between Artificial Intelligence


and traditional programming.
o Learning vs. Rule-based: AI systems learn from data,
while traditional programming uses predefined rules.
o Adaptability: AI can improve with more data, while
traditional programming requires manual updates.
o Complexity: AI can handle complex problems with
multiple variables, while traditional programming
handles simpler tasks with known solutions.
4. Describe how AI is transforming education and healthcare
sectors.
o Education: AI enables personalized learning through
adaptive learning systems, automated grading, and AI
tutors.
o Healthcare: AI is used for diagnostic systems, treatment
recommendations, and predicting patient outcomes.
5. Write a Python program to calculate the factorial of a
number using a loop.

python

num = int(input("Enter a number: "))


factorial = 1
for i in range(1, num + 1):
factorial *= i
print(f"The factorial of {num} is {factorial}")

6. Explain with examples the different types of machine


learning.
o Supervised Learning: The model is trained with labeled
data. Example: Email spam classification.
o Unsupervised Learning: The model finds patterns in
unlabeled data. Example: Customer segmentation.
o Reinforcement Learning: The model learns by
interacting with an environment and receiving feedback.
Example: Game AI.
7. What are variables in Python? Write a program to swap the
values of two variables.
Variables are containers used to store data in Python.

python

a = 5
b = 10
a, b = b, a
print("a =", a)
print("b =", b)

8. Discuss the ethical considerations in Artificial Intelligence


development.
o Bias: AI models should be trained on unbiased data to
avoid discriminatory outcomes.
o Privacy: AI systems must respect user privacy and data
protection laws.
o Accountability: Developers must ensure AI decisions
are explainable and transparent.
9. Write a Python program to find the largest number in a list
of numbers entered by the user.

python
numbers = [int(x) for x in input("Enter numbers
separated by spaces: ").split()]
largest = max(numbers)
print(f"The largest number is {largest}")

10. How is data visualized in the AI project cycle, and why is it


important?
Data visualization helps to understand patterns, trends, and
anomalies in data. It is essential in the evaluation stage to
assess model performance and make data-driven decisions.
Common visualizations include graphs, charts, and heatmaps.

Common questions

Powered by AI

In supervised learning, models are trained on labeled data where the output is known. For example, email spam classification uses labeled emails to learn patterns of spam and non-spam emails . Unsupervised learning involves training models on unlabeled data, aiming to identify patterns or groupings without explicit outcomes provided. An example is customer segmentation, where customers are grouped based on purchasing patterns without pre-labeled categories . Each approach addresses different types of problems depending on data availability and desired outcomes.

The Problem Scoping stage is crucial because it defines the problem, identifies necessary data, and sets the goals for the AI system . It lays the foundation for all subsequent stages, guiding the collection, modeling, and evaluation processes. Poor problem scoping can lead to misalignment between the AI system's capabilities and the actual business needs, inefficient use of resources, scope creep, and potentially the development of an ineffective solution that does not address the intended problem effectively . Proper scoping ensures clarity, focus, and alignment of objectives across stakeholders.

Ethical considerations in AI development include concerns about bias, privacy, and accountability. Bias occurs if AI models are trained on skewed or unrepresentative data, leading to discriminatory outcomes . Privacy issues arise when AI systems handle sensitive information, which necessitates adherence to data protection laws . Accountability involves ensuring that AI decisions are explainable, transparent, and that responsible parties are identified for decisions made by AI systems . These considerations impact trust, fairness, and legal compliance in AI deployments, influencing public acceptance and implementation strategies.

Data is crucial for AI as it forms the basis for training, validating, and testing models. It enables models to learn and make predictions; without quality data, models cannot be trained effectively or produce accurate results . Data allows for model testing and validation, ensuring that predictions are aligned with real-world outcomes. Moreover, data is necessary for adapting and improving model performance over time as it exposes AI systems to new scenarios and information .

AI enhances healthcare by enabling diagnostic systems, treatment recommendations, and patient outcome predictions . Its potential benefits include improved diagnostic accuracy, personalized treatment plans, and proactive health management . However, challenges involve ensuring data privacy, dealing with biased models that could lead to questionable clinical decisions, and integrating AI systems into existing healthcare workflows without disrupting patient care. Successfully mitigating these challenges can make AI a transformative force in healthcare delivery.

Indentation in Python defines code blocks and groups statements logically, critical for maintaining a clear and organized structure in programming . It is especially vital in loops, conditionals, and functions, where indentation indicates the hierarchical relationship between code statements . Proper indentation ensures code readability, reduces errors, and follows Python's syntax rules, which mandate consistent indentation to avoid syntax errors .

AI systems differ from traditional programming primarily in their capability to learn from data. AI systems adapt and improve over time by processing new data, whereas traditional programming requires explicit rule-based instructions crafted by developers . AI can handle complex problems involving numerous variables and dynamic changes in data, which would be difficult to address manually with traditional programming . The adaptability and learning-based approach of AI empower it to tackle complex tasks where predefined solutions are impractical or impossible.

AI transforms education by enabling personalized learning experiences through adaptive learning systems that tailor instruction based on student performance . AI also automates grading, providing immediate feedback, which allows educators to focus on interactive teaching . Additionally, AI tutors offer support in subjects where students need extra help, facilitating learning anytime and anywhere. For instance, platforms using AI might adjust mathematics problems based on a student's strengths and weaknesses, promoting efficient and effective learning outcomes .

The five stages of the AI project cycle are: Problem Scoping, Data Acquisition, Modeling, Evaluation, and Deployment. Problem Scoping involves defining the problem and setting goals (e.g., predicting house prices). Data Acquisition is the process of collecting data necessary for training (e.g., historical house prices). Modeling involves creating algorithms that learn from data, like using linear regression for house price prediction . Evaluation assesses model performance using metrics such as accuracy or error rates . Deployment implements the model for practical use, such as predicting future house prices in real-world scenarios . These stages ensure a structured approach to developing effective AI systems, from conception to implementation.

Data visualization is important because it helps understand patterns, trends, and anomalies within data, providing insights into the model's effectiveness and performance . During the evaluation stage, visualizations such as graphs, charts, and heatmaps enable stakeholders to interpret data intuitively, facilitating data-driven decisions about model adjustments and deployment . It transforms complex data into comprehendible formats, aiding transparency and communication with non-expert audiences about AI model results.

You might also like