0% found this document useful (0 votes)
68 views4 pages

AI and Python Worksheet Answers

l6ukyg,ftkuyfrftuy

Uploaded by

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

AI and Python Worksheet Answers

l6ukyg,ftkuyfrftuy

Uploaded by

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

AI and Python Worksheet - Answers

5. Short Answer Questions (10 Marks - 2 each)

1. What is a variable in Python?

A variable in Python is a container used to store data values. For example, name = "Mehadeep".

2. Write any two examples of AI in daily life.

- Voice assistants like Alexa or Siri

- Face recognition in mobile phones

3. What is Computer Vision used for?

Computer Vision enables computers to interpret and understand visual information from the world, like

identifying objects in images or videos.

4. Write a Python statement to store your name in a variable.

name = "Mehadeep"

5. What is the purpose of Natural Language Processing?

NLP allows machines to understand, interpret, and respond to human language (like chatbots, language

translation, etc.).

6. Code-Based Questions (10 Marks - 2 each)

1. Write a Python program to print "Hello, AI!".

print("Hello, AI!")

2. Write a Python program to take user input for two numbers and print their sum.
AI and Python Worksheet - Answers

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

b = int(input("Enter second number: "))

print("Sum:", a + b)

3. Write a Python program to check if a number is greater than 10.

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

if num > 10:

print("The number is greater than 10.")

else:

print("The number is not greater than 10.")

4. Write a Python program to display your name, class, and school.

print("Name: Mehadeep")

print("Class: 8")

print("School: The Cambridge International School")

5. Write a program to print the square of a number entered by the user.

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

print("Square:", num ** 2)

7. Application-Based Questions (10 Marks - 2 each)

1. Suggest an AI domain for automatic language translation. Explain why.

NLP (Natural Language Processing) is used because it helps computers understand, translate, and

generate human languages.


AI and Python Worksheet - Answers

2. Which AI domain is used in face detection in mobile phones?

Computer Vision is used for face detection by analyzing image data.

3. A self-driving car uses which AI domains together? List any two.

- Computer Vision (for seeing the road and objects)

- Machine Learning (for decision-making and predictions)

4. How does Python help in building AI projects?

Python is easy to learn and has powerful libraries like TensorFlow, scikit-learn, and OpenCV, which make

building AI projects easier.

5. In which domain of AI would a voice assistant like Siri fit?

Siri fits in NLP and Speech Recognition domains.

8. HOTS (Higher Order Thinking Skills) (10 Marks - 2 each)

1. Can AI work without data? Why or why not?

No, AI needs data to learn and make decisions. Without data, it cannot recognize patterns or improve over

time.

2. How does Python help in building smart machines?

Python has AI-specific libraries and frameworks that help train, test, and deploy smart machine models

easily.

3. Suggest two real-life tasks where AI can perform better than humans.

- Diagnosing diseases using medical images


AI and Python Worksheet - Answers

- Detecting fraud in financial transactions

4. Why do we use Python in AI instead of other programming languages?

Python is simple, readable, and has a wide range of libraries and community support for AI.

5. Imagine you want to create a chatbot. Which AI domain and Python skills would you need?

- AI Domain: Natural Language Processing (NLP)

- Python Skills: String handling, input/output, conditional statements, and libraries like NLTK or spaCy

Common questions

Powered by AI

AI can outperform humans in tasks like diagnosing diseases from medical images and detecting fraud in financial transactions. These tasks involve analyzing large data sets for patterns that may not be easily perceptible to humans, allowing AI systems to offer more consistent and accurate results .

Data is fundamental to AI because it forms the basis for training AI models to recognize patterns, make decisions, and improve over time. Without data, AI systems cannot learn or adapt, severely limiting their functionality and capacity for advancement .

NLP distinguishes itself from other AI domains by focusing specifically on the interaction between computers and human language. Its uses include understanding and generating human language for applications like chatbots and language translation, making it crucial for tasks involving text data processing and automated language-based decision making .

Python is preferred for AI for its simplicity and readability, making it accessible to developers. It also has extensive community support and a wide array of libraries like TensorFlow, scikit-learn, and OpenCV, tailored for AI development. Additionally, Python's versatility in handling diverse AI tasks and strong integration with C and Java further consolidates its status as a preferred programming language for AI .

Computer Vision in AI allows systems to interpret and understand visual information. It distinguishes itself by enabling tasks such as object detection and image classification. Practical applications include facial recognition for user authentication on smartphones and automated quality inspection systems in manufacturing .

Self-driving cars primarily utilize Computer Vision and Machine Learning. Computer Vision is critical for interpreting the car's surroundings by identifying and categorizing objects like vehicles and pedestrians. Machine Learning is used for decision-making processes such as route planning, obstacle avoidance, and predicting the behavior of other road users .

NLP features in everyday AI applications by enabling interactions between humans and machines in natural language. This includes applications like chatbots for customer service, language translation tools, and voice assistants such as Siri and Alexa, which interpret and respond to vocal commands .

When developing a chatbot, essential Python skills include string handling, input/output processing, conditional statements, and familiarity with libraries like NLTK or spaCy. These skills enable handling and interpreting user queries, managing logical flow, and implementing NLP techniques to generate appropriate responses .

Python assists in AI project implementation by providing robust libraries and frameworks, such as TensorFlow, scikit-learn, and OpenCV, which streamline the processes of training, testing, and deploying AI models. These libraries facilitate efficient management of computational resources and simplify the coding process, encouraging rapid prototyping .

Python's AI libraries, such as TensorFlow, Keras, and PyTorch, provide robust tools for building smart machines by simplifying the implementation of neural networks and other models. They streamline tasks such as data manipulation and algorithm development, enabling efficient training and deployment of machine learning applications .

You might also like