Artificial Intelligence Class 9 – has been designed by the teachers and examiners team. The team have collected Notes, all Important Subjective QA and MCQ from the Textbook.
CBSE Class 9 AI Questions and Answers Link – The Class 9 AI questions and answers from CBSE are crucial for students to enhance their exam performance. These notes condense the course material into easy-to-understand segments, equipping students for success in their theory exams.
The notes provide a convenient and efficient method of studying, enabling students to optimize their study time. Sharing these notes with classmates can encourage collaboration and support. By utilizing these Class 9 AI questions and answers, students are poised to achieve outstanding results on exams.
CBSE‘s integration of AI into the curriculum is intended to prepare students for future job prospects, boost digital literacy, foster innovation and problem-solving skills, provide practical experience with technology, and broaden understanding of AI and its ethical implications.
The Class 9 AI MCQ Link provided by CBSE are crucial for students to boost their exam results. The notes organize and simplify the course material, making it easier to comprehend. With these notes, students are well-prepared to excel in their theory exams.
The notes offer an efficient and time-saving way to study, allowing students to maximize their productivity. They can also be shared among classmates, fostering collaboration and support. By utilizing these Class 9 AI mcq link, students are likely to achieve exceptional results on their exams.
CBSE‘s incorporation of AI into the syllabus aims to prepare students for future job opportunities, improve digital literacy, foster innovation and problem-solving, provide hands-on technology experience, and increase understanding of AI and its ethical considerations.
CBSE Class 9 AI Notes Link are an essential for students to improve their performance in the exam. Notes will help organize and condense class material into manageable chunks, making it easier to review and understand the material. With these notes, students are fully equipped to achieve top marks on their theory exams.
The notes provide a convenient and time-saving solution, allowing students to maximize their studying efficiency. These comprehensive notes can also be shared with classmates, promoting collaboration and support in their studies. Utilizing these Class 9 AI notes can lead to outstanding results on exams.
CBSE introduced AI in the syllabus to prepare students for the future job market, promote digital literacy, encourage innovation and problem-solving skills, provide hands-on experience with technology, and enhance understanding of AI and its ethical implications.
Teachers and Examiners (CBSESkillEduction) collaborated to create the Flow of Control in Python Class 9 Notes. All the important Information are taken from the NCERT Textbook Artificial Intelligence (417).
Flow of Control in Python Class 9 Notes
There are three control flow statements in Python – if, for and while.
Decision Making Statement
In programming languages, decision-making statements determine the program’s execution flow. Python has the following decision-making statements:
if statement
if..else statements
if-elif ladder
If Statement
The if statement is used to test a condition: if the condition is true, a set of statements is executed (called the if-block).
Flow of Control in Python Class 9 Notes
Syntax -
test expression:
statement(s)
Flow of Control in Python Class 9 Notes
# Check if the number is positive, we print an appropriate message
num = 3
if num > 0:
print(num, “is a positive number.”)
print(“this is always printed”)
num = -1
if num > 0:
print(num, “is a positive number.”)
print(“this is always printed”)
If…else statement
The if/else statement is a control flow statement that allows you to run a block of code only if a set of conditions are satisfied.
Flow of Control in Python Class 9 Notes
Syntax -
if test expression:
Body of if
else:
Body of else
Flow of Control in Python Class 9 Notes
# A program to check if a person can vote
age = input(“Enter Your Age”)
if age >= 18:
print(“You are eligible to vote”)
else:
print(“You are not eligible to vote”)
Flow of Control in Python Class 9 Notes
# Write Python program to find the greatest number among two numbers
num1 = int(input(“Enter Number”));
num2 = int(input(“Enter Number”));
if num1 >= num2:
if num1 == num2:
print("Both numbers are equal.")
else:
print("Fisrt number is greater than the second number.")
else:
print("Second number is greater than the First number.")
Flow of Control in Python Class 9 Notes
# Write python program to check the number is even or odd
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
if-elif ladder
Elif stands for “else if.” It enables us to check for several expressions at the same time. If the if condition is False, the next elif block’s condition is checked, and so on. The body of else is executed if all of the conditions are False.
Flow of Control in Python Class 9 Notes
Syntax -
if test expression:
Body of if
elif test expression:
Body of elif
else: Body of else
Flow of Control in Python Class 9 Notes
# To check the grade of a student
Marks = 60
if marks > 75:
print("You get an A grade")
elif marks > 60:
print("You get a B grade")
else:
print("You get a C grade")
Nested if statements
An if…elif…else sentence can be nestled inside another if…elif…else statement. In computer programming, this is referred to as nesting.
Flow of Control in Python Class 9 Notes
# Write a program to check weather number is zero, positive or negative
num = float(input("Enter a number: "))
if num >= 0:
if num == 0:
print("Zero")
else:
print("Positive number")
else:
print("Negative number")
For Loop
The for statement allows you to specify how many times a statement or compound statement should be repeated. A for statement’s body is executed one or more times until an optional condition is met.
Syntax -
for val in sequence:
Body of for
# Program to find the sum of all numbers stored in a list
numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11]
sum = 0
for val in numbers:
sum = sum+val
print("The sum is", sum)
While Statement
The while statement allows you to repeatedly execute a block of statements as long as a condition is true. A while statement is an example of what is called a looping statement. A while statement can have an optional else clause.
Syntax -
while test_expression:
Body of while
Flow of Control in Python Class 9 Notes
# Program to add natural
n = int(input("Enter n: "))
sum = 0
i = 1
while i <= n:
sum = sum + i
i = i+1
print("The sum is", sum)
Teachers and Examiners (CBSESkillEduction) collaborated to create the Introduction to Packages Python Class 9 Notes. All the important Information are taken from the NCERT Textbook Artificial Intelligence (417).
Introduction to Packages Python Class 9 Notes
A package is simply a location where similar-type programmes, functions, or modules can be found. For diverse applications, there are a variety of free packages available (one of the benefits of Python being an open-source language).
The following are some of the readily available packages:
NumPy
A Python package for working with numerical arrays. It’s very useful for dealing with huge numerical databases and calculations.
Open CV
OpenCV is an image processing package that can deal explicitly with images and can be used for image manipulation and processing such as cropping, scaling, and editing, among other things.
Matplotlib
A software that aids in the visualisation of analytical data in graph form. It aids the user in better comprehending the data by allowing them to see it.
NLTK
Natural Language Tool Kit (NLTK) is a programme that aids in the processing of textual data. It is one of the most widely used Natural Lanague Processing packages.
Pandas
A Python library that aids in the processing of two-dimensional data tables. It comes in handy when working with data from Excel sheets or other databases.
Package Installation
Any package can be installed by directly writing the following command in the Anaconda
Step 1 : Open Anaconda Command Prompt
Step 2 : Type “conda install <package name>”
Step 3 : Press Enter
Step 4 : Proceed ([y]/n)?
Step 5 : Press “y”
Working with a package
To use a package, we must import it wherever it is needed in the script. In Python, there are several ways to import a differents version of package:
import numpy
Meaning: Import numpy into the file in order to use its features in the file where it was imported.
import numpy as np
Meaning: Import numpy and refer to it as np anywhere it’s used.
from numpy import array
Meaning: That is, only one functionality (array) from the entire numpy package is imported. While faster processing is achieved, the package’s usability is limited.
from numpy import array as arr
Meaning: Only one functionality (array) from the entire numpy package should be imported, and it should be referred to as arr whenever it is used.
What is NumPy?
NumPy, or Numerical Python, is the core Python library for performing mathematical and logical operations on arrays. When it comes to working with numbers, it is a widely utilised programme. NumPy provides a large range of arithmetic operations for working with numbers, making it easy to work with them. NumPy also works with arrays, which are just collections of data that are homogeneous.
An array is just a collection of many values of the same datatype. They can be numbers, characters, Booleans, and so on, but an array can only access one datatype at a time. The arrays used in NumPy are called ND-arrays (N-Dimensional Arrays) because NumPy has a function that allows you to create n-dimensional arrays in Python.
An array can easily be compared to a list. Let us take a look how different they are:
NumPy Arrays
List
Data collecting that is homogeneous.
Data collecting that is heterogeneous.
Can only hold one sort of data, making datatypes inflexible.
Datatypes are flexible because they can hold multiple types of data.
Cannot be initialised directly. It can only be used using the Numpy package.
Because it is part of the Python grammar, it can be immediately initialised.
It is possible to perform direct numerical operations. For instance, dividing the entire array by three splits each element by three.
It is not possible to perform direct numerical operations. For instance, dividing the entire list by three will not split each entry by three.
It is widely used in arithmetic.
It’s often used to handle data.
Arrays consume less memory.
Lists are given extra memory.
Illustration: To make a Numpy array named ‘A,’ follow these steps: A=numpy.array import numpy ([1,2,3,4,5,6,7,8,9,0])
Illustration: A = [1,2,3,4,5,6,7,8,9,0] to make a list
Introduction to Packages Python Class 9 Notes
Exploring NumPy!
The NumPy package has a number of features and functions that assist us with arithmetic and logical operations.
NumPy Arrays
Arrays are a collection of datatypes that are all the same name and same datatype.
We can use NumPy to generate n-dimensional arrays (where n can be any integer) and use other mathematical functions on them.
Here are various methods for creating arrays with the NumPy package, assuming the NumPy package has previously been loaded.
Function
Code
Creating a Numpy Array
numpy.array([1,2,3,4,5])
Creating a 2-Dimensional zero array (4X3 – 4 rows and 3 columns)
numpy.zeros((4,3))
Creating an array with 5 random values
numpy.random.random(5)
Creating a 2-Dimensional constant value array (3X4 – 3 rows and 4 columns) having all 6s
numpy.full((3,4),6)
Creating a sequential array from 0 to 30 with gaps of 5
numpy.arrange(0,30,5)
Introduction to Packages Python Class 9 Notes
Let’s have a look at some of the operations that could be performed on this array:
Function
Code
Adding 5 to each element
ARR + 5
Divide each element by 5
ARR / 5
Squaring each element
ARR ** 5
Accessing 2nd element of the array (element count starts from 0)
The above Introduction to Packages Python Class 9 Notes was created using the NCERT Book and Study Material accessible on the CBSE ACADEMIC as a reference.
Disclaimer – 100% of the questions are taken from the CBSE textbook Introduction to Packages Python Class 9 Notes, our team has tried to collect all the correct Information from the textbook . If you found any suggestion or any error please contact us anuraganand2017@gmail.com.
Teachers and Examiners collaborated to create the Introduction to Python Class 9 Questions and Answers. All the important QA are taken from the NCERT Textbook Artificial Intelligence ( 417 ) class IX.
Introduction to Python Class 9 Questions and Answers
1. What is the purpose of Python in AI? Answer – Python is at the heart of every modern artificial intelligence system. It’s the programming language of choice for data scientists and engineers creating the key infrastructure that drives today’s most sophisticated AI systems. As a result, many companies are using Python to develop their next generation of AI systems.
Introduction to Python Class 9 Questions and Answers
2. What are the benefits of Python Language? Answer – The benefits of Python Language are
1. Simple to understand, read, and maintain
2. Clear syntax and a simple keyword structure
3. Python includes a large library of built-in functions that can be used to tackle a wide range of problems.
4. Python features an interactive mode that enables interactive testing and debugging of code snippets.
5. Python runs on a wide range of operating systems and hardware platforms, with the same user interface across all of them.
6. We can use the Python interpreter to add low-level models. These models allow programmers to make their tools more efficient by customizing them.
7. Python includes interfaces to all major open source and commercial databases, as well as a more structured and robust framework and support for big systems than shell scripting.
Introduction to Python Class 9 Questions and Answers
3. What are the different applications of Python? Answer – The different application of Python are – Web and Internet Development 2. Desktop GUI Application 3. Software Development 4. Database Access 5. Business Application 6. Games and 3D Graphics
4. What do you mean by Interactive Mode in Python shell? Answer – Python IDLE Shell has a Python prompt where you can type single-line Python commands and have them executed quickly.
5. What do you mean by Script Mode in Python Shell? Answer – The Script Mode in Python allows you to add many lines of code. In script mode, we write a Python programme to a file and then run it using the interpreter. Working in interactive mode is advantageous for beginners and for testing small sections of code because it allows us to test them immediately. When developing code with more than a few lines, however, we should always save it so that we can change and reuse it later.
Introduction to Python Class 9 Questions and Answers
6. What is a python Statement? Answer – A statement is a piece of code that a Python interpreter can execute. In other terms, a statement is anything typed in Python. There are many different types of statements in the Python programming language, including assignment statements, conditional statements, looping statements, and so on.
7. What are Keywords? Answer – In Python, keywords are reserved words that help the interpreter recognise the program’s structure. Keywords are predefined terms in Python that have special meanings. The keyword isn’t allowed to be used as a variable, function, or identifier. With the exception of True and False, all Python keywords are written in lower case.
8. What are Identifiers? Answer – A variable, function, class, module, or other object is given a name called an identifier. A string of numerals and underscores make up the identifier. The identifier should start with a letter or an Underscore and end with a numeric. The characters are A-Z or a-z, an UnderScore (_), and a numeric (0-9). In identifiers, special characters (#, @, $, %,!) should be avoided.
Introduction to Python Class 9 Questions and Answers
9. What is Variable? Answer – In a computer language, a variable is a memory area where a value is stored. A variable in Python is created when a value is assigned to it. In Python, declaring a variable does not necessitate any additional commands.
10. What are the different rules for declaring the Variable? Answer – The rules for declaring variable are – 1. A number cannot be used as the first character in the variable name. Only a character or an underscore can be used as the first character. 2. Python variables are case sensitive. 3. Only alpha-numeric characters and underscores are allowed. 4. There are no special characters permitted.
Introduction to Python Class 9 Questions and Answers
11. What do you mean by Constant? Answer – A fixed-value variable is referred to as a constant. Constants are similar to containers that hold data that cannot be changed afterwards.
12. What is Data Type in Python? Answer – Each value in Python has a datatype. Because everything in Python programming is an object, data types are essentially classes, and variables are instances (objects) of these classes. Python supports a variety of data types. Some of the most common data types are listed here.
1. Numbers 2. Sequences 3. Sets 4. Maps
Introduction to Python Class 9 Questions and Answers
13. What is the purpose of Dictionaries in Python? Answer – Dictionaries are commonly employed in Python when dealing with large amounts of data. A dictionary is a collection array, exactly like any other. A dictionary is a collection of strings or numbers that can be altered and are not in any specific order. The keys are used to access dictionary items. A dictionary is declared using curly brackets.
14. What is Implicit Type Conversion? Answer – Python automatically changes one data type to another via implicit type conversion. There is no need for users to participate in this process. Example : x = 5 y=2.5 z = x / z
Introduction to Python Class 9 Questions and Answers
15. What is Explicit Type Conversion? Answer – Users transform the data type of an object to the required data type using Explicit Type Conversion. To do explicit type conversion, we employ predefined functions such as int(), float(), str(), and so on. Because the user casts (changes) the data type of the objects, this form of conversion is also known as typecasting.
Unit 4 – Introduction to Python Class 9 Questions and Answers
Reference Textbook
The above Introduction to Python Class 9 Questions and Answers was created using the NCERT Book and Study Material accessible on the CBSE ACADEMIC as a reference.
Disclaimer (CBSESkillEducation)- 100% of the questions are taken from the CBSE textbook Introduction to Python Class 9 Questions and Answers, and our team has tried to collect all the correct QA from the textbook . If you found any suggestion or any error please contact us anuraganand2017@gmail.com.
Teachers and Examiners collaborated to create the Introduction to Python Class 9 MCQ. All the important MCQs are taken from the NCERT Textbook Artificial Intelligence ( 417 ) class IX.
Introduction to Python Class 9 MCQ
1. Who developed Python Programming Language? a. Wick van Rossum b. Rasmus Lerdorf c. Guido van Rossum d. Niene Stom
Show Answer ⟶Hide Answer ⟵
c. Guido van Rossum
2. Python supports which types of programming? a. object-oriented programming b. structured programming c. functional programming d. All of the mentioned
Show Answer ⟶Hide Answer ⟵
d. All of the above
3. When it comes to identifiers, is Python case sensitive? a. No b. Yes c. Machine dependent d. None of the mentioned
Show Answer ⟶Hide Answer ⟵
b. yes
4. Which of the following is the valid Python file extension? a. .python b. .pl c. .py d. .p
Show Answer ⟶Hide Answer ⟵
c. .py
Introduction to Python Class 9 MCQ
5. All keywords in Python are in _________. a. Capitalized b. lower case c. UPPER CASE d. None of the mentioned
Show Answer ⟶Hide Answer ⟵
d. None of the mentioned
6. In Python, which of the following characters is used to create single-line comments? a. // b. # c. ! d. /*
Show Answer ⟶Hide Answer ⟵
b. #
7. Which of the following statements about variable names in Python is correct? a. Underscore and ampersand are the only two special characters allowed b. Unlimited length c. All private members must have leading and trailing underscores d. None of the mentioned
Show Answer ⟶Hide Answer ⟵
b. Unlimited length
8. What is the maximum length of an identifier that can be used? a. 16 b. 32 c. 64 d. None of these above
Show Answer ⟶Hide Answer ⟵
d. None of these above
9. When was the Python programming language created? a. 1995 b. 1972 c. 1981 d. 1989
Show Answer ⟶Hide Answer ⟵
d. 1989
Introduction to Python Class 9 MCQ
10. Python is written in which language? a. English b. PHP c. C d. All of the above
Show Answer ⟶Hide Answer ⟵
c. C
11. In the Python language, which of the following is not a keyword? a. Val b. Raise c. Try d. With
Show Answer ⟶Hide Answer ⟵
a. val
12. In the Python language, which of the following statements is correct for variable names? a. All variable names must begin with number. b. Unlimited length c. The variable name length is a maximum of 2 characters. d. All of the above
Show Answer ⟶Hide Answer ⟵
b. Unlimited length
13. A computer ___________ is a collection of instructions that perform a specific task when executed by a computer. a. Program b. Code c. Code Body d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Program
14. Why is Python such a widely used programming language? a. Easy to learn b. Portability and compatibility c. A Broad Standard Library d. All of the above
Show Answer ⟶Hide Answer ⟵
d. All of the above
Introduction to Python Class 9 MCQ
15. What are the various applications that Python supports? a. Web and Desktop GUI Application b. Database Access c. Games and 3D Graphics d. All of the above
Show Answer ⟶Hide Answer ⟵
d. All of the above
16. Python is a _________ programming language, which means it runs on a variety of platforms including Windows, MacOS, Linux, and the Java and.NET Virtual machines. a. Cross-platform b. Single-platform c. Code-platform d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Cross-platform
17. Python ___________ must be installed on our machine in order to run a Python programme. a. Interpreter b. Compiler c. Assembler d. All of the above
Show Answer ⟶Hide Answer ⟵
a. Interpreter
18. IDE stands for ______________. a. Integrated Development Environment b. Internal Develop Environment c. Inside Development Environment d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Integrated Development Environment
19. IDLE stands for ____________. a. Integrated Development and Learning Environment b. Internal Develop and Learning Environment c. Inside Development and Learning Environment d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Integrated Development and Learning Environment
Introduction to Python Class 9 MCQ
20. IDE helps to __________ python programs in a single interface. a. Edit, Run b. Browse c. Debug d. All of the above
Show Answer ⟶Hide Answer ⟵
d. All of the above
21. What are the two methods for using a Python shell? a. Interaction Mode, Sub Mode b. Interactive Mode, Script Mode c. Shell Mode, Python Mode d. None of the above
Show Answer ⟶Hide Answer ⟵
b. Interactive Mode, Script Mode
22. You can add a programme in __________ in Interactive Mode. a. Multiple Line b. Single Line c. Two Line d. None of the above
Show Answer ⟶Hide Answer ⟵
b. Single Line
23. You can add a programme in __________ in Script Mode. a. Multiple Line b. Single Line c. Two Line d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Multiple Line
24. Instructions written in the source code for execution are called ___________. a. Statements b. Sentence c. Both a) and b) d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Statements
Introduction to Python Class 9 MCQ
25. Statements in Python can be extended to one or more lines using _____________. a. braces{} b. Parentheses() c. Square Brackets[] d. All of the above
Show Answer ⟶Hide Answer ⟵
d. All of the above
26. A _________ is a piece of text that doesn’t impact the outcome of a programme; it’s just a way to tell someone what you’ve done in a programme or what’s going on in a block of code. a. Statement b. Comments c. Nodes d. None of the above
Show Answer ⟶Hide Answer ⟵
b. Comments
27. _________ are the reserved words in Python used by the Python interpreter to recognize the structure of the program. a. Keywords b. Identifiers c. Comments d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Keywords
28. An ____________ is a name given to entities like class, functions, variables, etc. a. Keywords b. Identifiers c. Comments d. None of the above
Show Answer ⟶Hide Answer ⟵
b. Identifiers
29. Python is a ____________ language. a. Upper case b. Small case c. Case-sensitive d. None of the above
Show Answer ⟶Hide Answer ⟵
c. Case-sensitive
Introduction to Python Class 9 MCQ
30. In the Identifier, Multiple words can be separated using an ___________. a. Underscore b. Parentheses c. Bracket d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Underscore
31. An identifier cannot start with a __________. a. Numbers b. Character c. Underscore d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Numbers
32. ___________ cannot be used as identifiers. a. Numbers b. Characters c. Keywords d. None of the above
Show Answer ⟶Hide Answer ⟵
c. Keywords
33. Which special symbol is not allowed in Identifier. a. !, @ b. #, $ c. % d. All of the above
Show Answer ⟶Hide Answer ⟵
d. All of the above
34. A ___________ is a name location used to store data in the memory. a. Variable b. Keywords c. Statement d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Variable
Introduction to Python Class 9 MCQ
35. A _________ is a type of variable whose value cannot be changed. a. Constant b. Statement c. Identifier d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Constant
36. ________ characters are possible to declare a constant. a. Small Character b. Capital Character e. Both a) and b) f. None of the above
Show Answer ⟶Hide Answer ⟵
e. Both a) and b)
37. In python everything’s an ___________. a. Variable b. Constant d. Object e. None of the above
Show Answer ⟶Hide Answer ⟵
d. Object
38. What are the different types of numerical data types? a. Integer & Long b. Float / Floating point c. Both a) and b) d. None of the above
Show Answer ⟶Hide Answer ⟵
c. Both a) and b)
39. Numbers with fractions or decimal points are called ________ datatype. a. Integer b. String c. Float d. None of the above
Show Answer ⟶Hide Answer ⟵
c. Float
Introduction to Python Class 9 MCQ
40. A ___________ is an ordered collection of items, indexed by positive integers. It is a combination of mutable and non-mutable data types. a. Sequence b. Integer c. Float d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Sequence
41. What are the different types of Sequence data types in python? a. String b. Lists c. Tuples d. All of the above
Show Answer ⟶Hide Answer ⟵
d. All of the above
42. String is an ordered sequence of letters/characters. They are enclosed in single quotes (‘ ‘) or double (“ “). a. String b. Integer c. Float d. None of the above
Show Answer ⟶Hide Answer ⟵
a. String
43. ___________ are a sequence of values of any type, and are indexed by integers. They are immutable. Tuples are enclosed in (). a. String b. Lists c. Tuples d. All of the above
Show Answer ⟶Hide Answer ⟵
c. Tuples
44. __________is an unordered collection of values, of any type, with no duplicate entry. a. String b. Set c. Dictionaries d. None of the above
Show Answer ⟶Hide Answer ⟵
b. Set
Introduction to Python Class 9 MCQ
45. ____________is an unordered collection of key-value pairs. It is generally used when we have a huge amount of data. a. String b. Set c. Dictionaries d. None of the above
Show Answer ⟶Hide Answer ⟵
c. Dictionaries
Introduction to Python Class 9 MCQ
46. _________ are special symbols which represent computation. They are applied on operand(s), which can be values or variables. a. Operators b. Operand c. Declaration d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Operators
47. Operators are categorized as _____________. a. Arithmetic b. Relational c. Logical and Assignment d. All of the above
Show Answer ⟶Hide Answer ⟵
d. All of the above
48. _________ function is used to given output in python. a. printf() b. print() c. scan() d. None of the above
Show Answer ⟶Hide Answer ⟵
b. print()
49. _________ function is used to take input from the user in python. a. Input() b. Insert() c. Store() d. None of the above
Show Answer ⟶Hide Answer ⟵
a. Input()
Introduction to Python Class 9 MCQ
50. How many type of conversion in python. a. Implicity Type Conversion b. Explicity Type Conversion c. Py Type Conversion d. Both a) and b)
Show Answer ⟶Hide Answer ⟵
d. Both a) and b)
51. Python automatically converts one data type to another datatype. This process is known as ___________. a. Implicity Type Conversion b. Explicity Type Conversion c. Py Type Conversion d. Both a) and b)
Show Answer ⟶Hide Answer ⟵
a. Implicity Type Conversion
52. Convert the data type of an object to required data type. We use the predefined functions like int(), float(), str(), etc to perform ____________. a. Implicity Type Conversion b. Explicity Type Conversion c. Py Type Conversion d. Both a) and b)
Show Answer ⟶Hide Answer ⟵
b. Explicity Type Conversion
Reference Textbook
The above Introduction to Python Class 9 MCQ was created using the NCERT Book and Study Material accessible on the CBSE ACADEMIC as a reference.
Disclaimer (CBSESkillEducation)- 100% of the questions are taken from the CBSE textbook Introduction to Python Class 9 MCQ, and our team has tried to collect all the correct MCQs from the textbook . If you found any suggestion or any error please contact us anuraganand2017@gmail.com.
Teachers and Examiners (CBSESkillEduction) collaborated to create the Introduction to Tools for AI Class 9 Notes. All the important Information are taken from the NCERT Textbook Artificial Intelligence (417).
Introduction to Tools for AI Class 9 Notes
Introduction to Anaconda
We’ve looked into three primary AI domains: data, natural language processing, and computer vision. It’s not uncommon for these domains to have distinct packages that need to be installed while creating code.
Even if we can install them all in IDLE, managing them all is difficult.
Anaconda
Anaconda is a free and open-source Python distribution aimed at simplifying package management and deployment in scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, and so on). It allows users to construct different virtual environments, each with its own packages and settings, depending on their needs.
Anaconda Navigator
Anaconda Navigator is a desktop graphical user interface (GUI) that comes with Anaconda that allows you to run programmes and manage conda packages, environments, and channels without having to use command line commands.
Step 2 : Scroll down to the bar with operating system options and click on windows.
Step 3 : Under Python 3.7 version, select the right option according to the configuration of your pc(32-bit/64-bit). The download will begin.
Step 4 : Double click the installer to launch.
Step 5 : Click on “Next”.
Step 6 : Read the license agreement and click on “I Agree”.
Step 7 : Select an install for “Just Me” unless you’re installing for all users (which requires Windows Administrator privileges) and click “Next”.
Step 8 : Select destination folder, and click “Next”.
Step 9 : Do not change anything in PATH Options, click “Next”.
Step 10 : Wait for the installation to complete.
Step 11 : Click on “Skip” to continue.
Introduction to Tools for AI Class 9 Notes
Jupyter Notebook
The Jupyter Notebook is an exceptionally effective tool for developing and presenting AI-related projects in an interactive manner. Jupyter is the successor to the previous IPython Notebook project, which was first released as a prototype in 2010.
What is a Notebook?
A notebook mixes graphics, narrative prose, mathematical equations, and other rich media with code and its output in a single document. Notebooks are becoming an increasingly popular choice at the centre of contemporary data science, analysis, and, increasingly, science at large, thanks to their natural workflow that encourages iterative and rapid improvement.
Installing Jupyter Notebook
Anaconda is the most convenient way to install and use Jupyter Notebook. Anaconda is the most popular Python data science distribution, and it comes pre-installed with all of the most popular libraries and tools. With Anaconda, we get the Anaconda Navigator, which allows us to scroll through all of the applications that come with it.
Introduction to Tools for AI Class 9 Notes
Working with Jupyter Notebook
It is important to have a kernel on which Jupyter Notebook runs in order to use it. In Jupyter, a kernel provides programming language support. Jupyter Notebook’s default kernel is IPython. As a result, whenever we need to use Jupyter Notebook in a virtual environment, we must first install a kernel in the environment where the notebook will operate.
Open Anaconda Prompt and type the following command to install the kernel:
Command –conda install jupyter nb_conda ipykernel
Jupyter is a Jupyter Notebook extension that is installed in this case. nb conda refers to notebook conda, which is an extension to jupyter kernel to set the kernel for a notebook’s execution. Ipykernel is a powerful and interactive Python shell and a jupyter kernel to work with python code in Jupyter Notebooks, and nb conda refers to notebook conda, which is an extension to jupyter kernel to set the kernel for a notebook To open the Jupyter Notebook, use the following command after the installation is complete.
Command – Jupyter notebook
Introduction to Tools for AI Class 9 Notes
Feature of Jupyter Notebook
Menu Bar
File: In the file menu, you can create a new Notebook or open a pre-existing one. This is also where you would go to rename a Notebook. I think the most interesting menu item is the Save and Checkpoint option. This allows you to create checkpoints that you can roll back to if you need to.
Edit Menu: Here you can cut, copy, and paste cells. This is also where you would go if you wanted to delete, split, or merge a cell. You can reorder cells here too.
View menu: The View menu is useful for toggling the visibility of the header and toolbar. You can also toggle Line Numbers within cells on or off. This is also where you would go if you want to mess about with the cell’s toolbar.
Insert menu: The Insert menu is just for inserting cells above or below the currently selected cell.
Cell menu: The Cell menu allows you to run one cell, a group of cells, or all the cells. You can also go here to change a cell’s type, although the toolbar is more intuitive for that. The other handy feature in this menu is the ability to clear a cell’s output.
Kernel Menu: The Kernel cell is for working with the kernel that is running in the background. Here you can restart the kernel, reconnect to it, shut it down, or even change which kernel your Notebook is using
Widgets Menu: The Widgets menu is for saving and clearing widget state. Widgets are basically JavaScript widgets that you can add to your cells to make dynamic content using Python (or another Kernel)
Help Menu: Finally, you have the Help menu, which is where you go to learn about the Notebook’s keyboard shortcuts, a user interface tour, and lots of reference material.
The above Introduction to Tools for AI Class 9 Notes was created using the NCERT Book and Study Material accessible on the CBSE ACADEMIC as a reference.
Disclaimer – 100% of the questions are taken from the CBSE textbook Introduction to Tools for AI Class 9 Notes, our team has tried to collect all the correct Information from the textbook . If you found any suggestion or any error please contact us anuraganand2017@gmail.com.
Teachers and Examiners (CBSESkillEduction) collaborated to create the Introduction to Python Class 9 Notes. All the important Information are taken from the NCERT Textbook Artificial Intelligence (417).
Python is a programming language used by many professionals today. It’s easy to learn, relatively inexpensive, and has many uses. If you are interested in programming and want to learn the basics in a simple, hands-on way, this is the right class for you.
Introduction to Python Class 9 Notes
What is program
A computer program is a collection of instructions that perform a specific task when executed by a computer. The purpose of programs is to make computer programs run faster, safer, and more efficiently. Programs do everything in a computer: they read and write data, manage memory, and perform calculations. They are the building blocks of the operating system, the software that runs our most important functions, and the programs we write ourselves. One of the most important programs on a computer is the operating system, which performs basic functions such as memory management and file management.
Programming languages such as C++, Java, Python, and Ruby are used to construct programmes. These are human-readable and writable high-level programming languages.
Why Python for AI?
At the core of every modern artificial intelligence system is Python. It’s the programming language of choice for data scientists and engineers building the critical infrastructure that powers today’s most advanced AI systems. For this reason, many organizations are turning to Python to build their next generation of AI systems. This guide will help you get started using Python for AI.
Lisp, Prolog, C++, Java, and Python are some of the programming languages that can be used to create AI applications.
Python is the most popular of these because of the following reasons:
Simple to understand, read, and maintain
Clear syntax and a simple keyword structure
Python includes a large library of built-in functions that can be used to tackle a wide range of problems.
Python features an interactive mode that enables interactive testing and debugging of code snippets.
Python runs on a wide range of operating systems and hardware platforms, with the same user interface across all of them.
We can use the Python interpreter to add low-level models. These models allow programmers to make their tools more efficient by customizing them.
Python includes interfaces to all major open source and commercial databases, as well as a more structured and robust framework and support for big systems than shell scripting.
Applications of Python
Python is a high-level, general-purpose programming language. It is different from other languages such as C and Java that are designed to be compiled to machine code. Python is easy to learn and can be used to write virtually anything that can be described in code.
There are different type of Python Application –
Web and Internet Development
Desktop GUI Application
Software Development
Database Access
Business Application
Games and 3D Graphics
Installation of Python
Python is a cross-platform programming language, which means it runs on a variety of platforms including Windows, MacOS or Linux operating system.
A Python interpreter must be installed on our computer in order to write and run Python programmes.
Downloading and Setting up Python
Step 1 : Download Python from python.org using link python.org/downloads
Step 2 : Select appropriate download link as per Operating System [Windows 32 Bit/64 Bit, Apple iOS]
Step 3 : Click on Executable Installer
Step 4 : Install
Python IDLE installation
After installing Python, you’ll need an IDE to write Python programmes. IDLE is a Python editor with a graphical user interface. IDLE stands for Integrated Development Environment. This IDLE is also known as the Python shell, and it has two modes of operation: interactive mode and script mode. Interactive Mode allows us to communicate with the operating system, whereas Script Mode allows us to generate and edit Python source files.
Interactive Mode
Python IDLE Shell provides a Python prompt, You can write single line python commands and execute them easily.
Script Mode
In Python, the Script Mode allows you to add numerous lines of code. In script mode, we type a Python programme into a file and then use the interpreter to run the code. Working in interactive mode is useful for beginners and for testing little parts of code because it allows us to test them right away. However, while writing code with more than a few lines, we should always save it so that we may alter and reuse it.
Python Statement and Comments
Python Statement
A statement is a piece of code that can be executed by a Python interpreter. So, in simple words, anything written in Python is a statement. In The Python programming language, there are various types of statements, such as assignment statements, conditional statements, looping statements and so on. These assist the user in obtaining the desired result.
Multiline Statement
The token NEWLINE character is used at the end of a Python statement. However, we can use the line continuation character to extend the statement across many lines (\).
We can utilize these characters when we need to execute long calculations and can’t fit all of the assertions on a single line.
Type of Multi-line Statement
Usage
Using Continuation Character (/)
s = 1 + 2 + 3 + \
4 + 5 + 6 + \
7 + 8 + 9
Using Parentheses ()
n = (1 * 2 * 3 + 4 – 5)
Using Square Brackets []
footballer = [‘MESSI’,
‘NEYMAR’,
‘SUAREZ’]
Using braces {}
x = {1 + 2 + 3 + 4 + 5 + 6 +
7 + 8 + 9}
Using Semicolons ( ; )
flag = 2; ropes = 3; pole = 4
Python Comments
In Python, comments are lines of code that are skipped by the interpreter while the programme is being run. Comments improve the readability of the code and assist programmers in completely comprehending it. In Python there are two types of comment.
a. Single Line comment
A single-line comment in Python begins with the hash symbol (#) and continues until the end of the line.
Example
# Single line comment
b. Multiple Line comment
There are a variety of methods for writing multiline comments.
Example
c. Using Multiple hash (#)
# Multiple line comment 1
# Multiple line comment 2
d. Multiline comment using String literals
“ “ “ Multiline comment in
Python statement “ “ “
Or
‘ ‘ ‘ Multiline comment in
Python statement ‘ ‘ ‘
Python Keywords and Identifiers
Keywords – Keywords are reserved words in Python that the Python interpreter uses to recognise the program’s structure. In Python, keywords are predefined words with specific meanings. The keyword can’t be used as a variable name, function name, or identifier. Except for True and False, all keywords in Python are written in lower case.
Example of Keywords –
False, class, finally, is, return, None, continue, for lambda, try, True, def, from, nonlocal, while, and, del, global, not, with, as, elif, if, or, yield, assert, else, import, pass, break, except, in, raise etc.
Identifiers – An identifier is a name given to a variable, function, class, module, or other object. The identification is made up of a series of digits and underscores. The identification should begin with a letter or an Underscore and then be followed by a digit. A-Z or a-z, an UnderScore (_), and a numeral are the characters (0-9). Special characters (#, @, $, percent,!) should not be used in identifiers.
Identifiers can be a combination of letters in lowercase (a to z) or uppercase (A to Z) or digits (0 to 9) or an underscore _.
An identifier cannot start with a digit
Keywords cannot be used as identifiers
We cannot use special symbols like !, @, #, $, % etc. in our identifier
Identifier can be of any length
Python is a case-sensitive language.
Example of Identifier
var1
_var1
_1_var
var_1
Variables, Constants and Data Types
Variables
A variable is a memory location where you store a value in a programming language. In Python, a variable is formed when a value is assigned to it. Declaring a variable in Python does not require any further commands.
There are a certain rules and regulations we have to follow while writing a variable
A number cannot be used as the first character in the variable name. Only a character or an underscore can be used as the first character.
Python variables are case sensitive.
Only alpha-numeric characters and underscores are allowed.
There are no special characters permitted.
Constants
A constant is a kind of variable that has a fixed value. Constants are like containers that carry information that cannot be modified later.
Declaring and assigning value to a constant
NAME = “Rajesh Kumar”
AGE = 20
Datatype
In Python, each value has a datatype. Data types are basically classes, and variables are instances (objects) of these classes, because everything in Python programming is an object.
Python has a number of different data types. The following are some of the important datatypes.
Numbers
Sequences
Sets
Maps
a. Number Datatype
Numerical Values are stored in the Number data type. There are four categories of number datatype –
Int – Int datatype is used to store the whole number values. Example : x=500
Float – Float datatype is used to store decimal number values. Example : x=50.5
Complex – Complex numbers are used to store imaginary values. Imaginary values are denoted with ‘j’ at the end of the number. Example : x=10 + 4j
Boolean – Boolean is used to check whether the condition is True or False. Example : x = 15 > 6 type(x)
b. Sequence Datatype
A sequence is a collection of elements that are ordered and indexed by positive integers. It’s made up of both mutable and immutable data types. In Python, there are three types of sequence data types:
String – Unicode character values are represented by strings in Python. Because Python does not have a character data type, a single character is also treated as a string. Single quotes (‘ ‘) or double quotes (” “) are used to enclose strings. These single quotes and double quotes merely inform the computer that the beginning of the string and end of the string. They can contain any character or symbol, including space. Example : name = ”Rakesh kumar”
List – A list is a sequence of any form of value. The term “element” or “item” refers to a group of values. These elements are indexed in the same way as an array is. List is enclosed in square brackets. Example : dob = [19,”January”,1995]
Tuples – A tuple is an immutable or unchanging collection. It is arranged in a logical manner, and the values can be accessed by utilizing the index values. A tuple can also have duplicate values. Tuples are enclosed in (). Example : newtuple = (15,20,20,40,60,70)
c. Sets Datatype
A set is a collection of unordered data and does not have any indexes. In Python, we use curly brackets to declare a set. Set does not have any duplicate values. To declare a set in python we use the curly brackets.
Example : newset = {10, 20, 30}
d. Mapping
This is an unordered data type. Mappings include dictionaries.
Dictionaries
In Python, Dictionaries are used generally when we have a huge amount of data. A dictionary is just like any other collection array. A dictionary is a list of strings or numbers that are not in any particular sequence and can be changed. The keys are used to access objects in a dictionary. Curly brackets are used to declare a dictionary. Example : d = {1:’Ajay’,’key’:2}
Operators
Operators are symbolic representations of computation. They are used with operands, which can be either values or variables. On different data types, the same operators can act differently. When operators are used on operands, they generate an expression.
Operators are categorized as –
Arithmetic operators
Assignment operators
Comparison operators
Logical operators
Identity operators
Membership operators
Bitwise operators
Arithmetic Operators
Mathematical operations such as addition, subtraction, multiplication, and division are performed using arithmetic operators.
Operator
Meaning
Expression
Result
+
Addition
20 + 20
40
–
Subtraction
30 – 10
20
*
Multiplication
10 * 100
1000
/
Division
30 / 10
20
//
Integer Division
25 // 10
2
%
Remainder
25 % 10
5
**
Raised to power
3 ** 2
9
Assignment Operator
When assigning values to variables, assignment operators are used.
Operator
Expression
Equivalent to
=
x=10
x = 10
+=
x += 10
x = x + 10
-=
x -= 10
x = x – 10
*=
x *= 10
x = x * 10
/=
x /= 10
x = x / 10
Comparison Operator
The values are compared using comparison operators or relational operators. Depending on the criteria, it returns True or False.
Operator
Meaning
Expression
Result
>
Greater Than
20 > 10
True
20 < 50
False
<
Less Than
20 < 10
False
10 < 40
True
==
Equal To
5 == 5
True
5 == 6
False
!=
Not Equal to
67 != 45
True
35 != 35
False
Logical Operator
Logical operators are used to combine the two or more then two conditional statements –
Operator
Meaning
Expression
Result
And
And Operator
True and True
True
True and False
False
Or
Or Operator
True or False
True
False or False
False
Not
Not Operator
Not False
True
Not True
False
Type Conversion
Type conversion is the process of converting the value of one data type (integer, text, float, etc.) to another data type. There are two types of type conversion in Python.
Implicit Type Conversion
Explicit Type Conversion
Implicit Type Conversion
Python automatically changes one data type to another via implicit type conversion. There is no need for users to participate in this process.
Example :
x = 5
y=2.5
z = x / z
In the above example, x is containing integer value, y is containing float value and in the variable z will automatically contain float value after execution.
Explicit Type Conversion
Users transform the data type of an object to the required data type using Explicit Type Conversion.
To do explicit type conversion, we employ predefined functions such as int(), float(), str(), and so on.
Because the user casts (changes) the data type of the objects, this form of conversion is also known as typecasting.
Example : Birth_day = str(Birth_day)
Python Input and Output
Python Output Using print() function
To output data to the standard output device, we use the print() method (screen).
Data can also be saved to a file. The following is an example.
Example :
a = “Hello World!”
print(a)
Output – Hello World!
Python User input
In python, input() function is used to take input from the users.
The above Introduction to Python Class 9 Notes was created using the NCERT Book and Study Material accessible on the CBSE ACADEMIC as a reference.
Disclaimer – 100% of the questions are taken from the CBSE textbook Introduction to Python Class 9, our team has tried to collect all the correct Information from the textbook . If you found any suggestion or any error please contact us anuraganand2017@gmail.com.
Teachers and Examiners collaborated to create the Neural Network Class 9 Questions and Answers. All the important QA are taken from the NCERT Textbook Artificial Intelligence ( 417 ) class IX.
Neural Network Class 9 Questions and Answers
1. What is algorithm? Answer – A machine learning algorithm is a series of instructions that allows a computer programme to replicate how a human learns to classify different types of data.
2. Type of learning algorithm? Answer – There are three type of learning algorithm. a. Supervised Learning b. Unsupervised Learning c. Reinforcement Learning
3. What is supervised learning? Answer –Supervised learning is a method of artificial intelligence development that involves training a computer algorithm on labelled input data for a specific output.
4. What is unsupervised learning? Answer – Unsupervised learning is the use of artificial intelligence (AI) systems to detect patterns in data sets that contain data points that are neither categorized nor labelled.
5. What is reinforcement learning? Answer – Through reinforcement learning, an intelligent agent interacts with the environment and learns to operate within it.
6. What are the future of Neural network? Answer – The future of Neural network are – a. Neural network systems are modelled using the human brain and nervous system. b. They can extract features without the input of the programmer. c. A neural network’s nodes are all machine learning algorithms. d. It comes in handy when dealing with problems involving a huge data set.
The above Neural Network Class 9 Questions and Answers was created using the NCERT Book and Study Material accessible on the CBSE ACADEMIC as a reference.
Disclaimer (CBSESkillEducation)- 100% of the questions are taken from the CBSE textbook Neural Network Class 9 Questions and Answers, and our team has tried to collect all the correct QA from the textbook . If you found any suggestion or any error please contact us anuraganand2017@gmail.com.