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

Sec B Question Paper

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)
18 views4 pages

Sec B Question Paper

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
You are on page 1/ 4

PM SHRI KENDRIYA VIDYALAYA KHAMMAM

Python AI&ML NIELET Question Paper


MARKS: 30 TIME: 60 Mins

CLASS: VIII SECTION: B

NAME: ROLL NUMBER:

Section 1(Artificial Intelligence):


1. What is Artificial Intelligence (AI)?
a) A type of computer hardware b) A software program that can think and learn
c) A human d) A new programming language

2. Which of the following is an example of AI?


a) calculator b) smartphone c) self-driving car d) television

3. Which of the following is a disadvantage of Artificial Intelligence (AI)?


a) Increased efficiency b) Improved decision-making
c) Job Loss d) problem-solving abilities

4. What was the name of Sony's first generation of robotic dog released in 1999?
a) CyberDog b) AIBO c) Spot d) KIBO

Section 2(Machine Learning):


5. Which of the following is a real-world application of machine learning?
a) Recommendation systems b) Spam filters
c) Medical diagnosis d) All of the above

6. What is reinforcement learning?


a) Learning by observing b) Learning with a teacher
c) Learning through rewards and actions d) Learning by memorizing

7. Which of the following is a type of Machine Learning where the model learns
from labeled data(input and output both are provided)?
a) Unsupervised Learning b) Supervised Learning
c) Reinforcement Learning d) Deep Learning

8. What does DL stand for in the field of Artificial Intelligence?


a) Digital Learning b) Data Logging c) Deep Learning d) Dynamic Linking
Section 3(Python):
9. Which data type in Python is used to store a text value?
a) Integer b) Float c) String d) Boolean

10. What is the data type of the variable “x” in the following code?
Code:
x = True
a) Integer b) String c) Float d) Boolean

11. What will be the output of the following code snippet?


Code:
x = "Hello"
print(type(x))

a) hello b) str c) string d) String

12. What is the result of the expression 4 < 5 and 5 < 6?


a) True b) False c) Error d) None of the above

13. What does the expression not(10 == 10) evaluate to?


a) True b) False c) Error d) None of the above

14. What is the result of the following expression in Python?


Code:
10 > 5 < 2

a) True b) False c) 7 d) Error

15. What is the result of the following expression in Python?


Code:
5 + 2 * 3 ** 2

a) 35 b) 23 c) 25 d) 17

16. Which operator is used to perform logical AND operation?


a) & b) && c) and d) AND

17. What is a variable in Python?


a) A container to store data b) A function to perform mathematical operations
c) A loop to iterate through data d) A conditional statement for decision-making
18. Which symbol is used to assign a value to a variable in Python?
a) = b) : c) # d) $

19. Which of the following is not a valid variable name in Python?


a) my_variable_1 b) 1st_variable c) variable2 d) _variable

20. What will be the output of the following code snippet?


code:
x = 10
if x > 5:
print("x is greater than 5")

a) x is greater than 5 b) x is less than 5


c) x is equal to 5 d) No output

21. What is the purpose of the while loop in Python?


a) To execute a block of code repeatedly until a condition is false
b) To execute a block of code a fixed number of times
c) To define a function
d) To iterate over items in a sequence

22. What is the purpose of the break statement in a loop?


a) To continue to the next iteration of the loop b) To exit the loop immediately
c) To skip the current iteration d) To pause the loop

23. What is the output of the following code?


Code:
i=1
while i <= 5:
print(i)
i=i+1
a) 1 2 3 4 5 b) 1 2 3 4 c) 2 3 4 5 d) Infinite loop

24. What will be the output of this code?


Code:
for i in range(10):
if i % 2 == 0:
continue
if i > 5:
break
print(i)
a) 1 3 5 7 9 b) 1 3 5
c) 1 3 5 7 d) 1 2 3 4 5 6 7 8 9 10

25. Which operator has the highest precedence in Python?


a) + b) - c) * d) **

26. What kind of error will the below code produce?


Code:
x = 10
y=0
z=x/y
print(z)

a) SyntaxError b) TypeError c) ZeroDivisionError d) ValueError

27. What will be the output of the below code?


Code:
word = "hello"
print('h' in word)

a) True b) False c) Error d) None

28. What will be the output of the above code?


Code:
word = "hello"
print(len(word))

a) 4 b) 5 c) 6 d) 7

29. What is the primary purpose of a list in Python?


a) To store a single value b) To store a collection of values
c) To perform mathematical calculations d) To control the flow of a program

30. How do you create an empty list in Python?


a) list() b) [] c) {} d) ()

You might also like