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

Sec A 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)
25 views4 pages

Sec A 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: A

NAME: ROLL NUMBER:

Section A: Artificial Intelligence and Machine Learning.

1. What is Artificial Intelligence (AI)?


a) The ability of machines to think and work like the human brain
b) A type of database management system
c) A programming language used to build websites
d) A method of storing data in the cloud

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

3. In which type of Machine Learning does the model learn by exploring an environment and receiving
feedback through rewards or penalties?
a) Supervised Learning b) Unsupervised Learning
c) Reinforcement Learning d) Transfer Learning

4. What does the full form of NLP stand for?


a) Neural Language Processing b) Neural Learning Programming
c) Natural Language Processing d) Network Learning Processing

Section B: Python

5. Which of these is the correct way for assigning value to a variable?


a) x = 10 b) let x = 10 c) var x : 10 d) declare x as 10

6. In Python, which command is used to display output on the screen?


a) echo() b) show() c) print() d) output()
7. Which of these data types is NOT available in Python?
a) Integer b) String c) Float d) Character

8. Which of the following Python functions is used to take input from the user?
a) input() b) get() c) scan() d) read()

Section C: Python - Data Types & Operators

9. Which of the following is a correct example of a list in Python?


a) [1, 2, 3] b) 1, 2, 3 c) {1, 2, 3} d) 1, 2, 3, 4

10. What is the default data type of a value assigned to a variable in Python?
a) Integer b) Float c) String d) List

11.Can we Change the values in the Tuple after creating?


a) Yes b) No

12. Which data type in Python is used to store an Integer value?


a) Integer b) Float c) String d) Boolean

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

14. What will be the output of the following code?


x = "Hello"
print(type(x))
a) hello b) str c) string d) String

15. What will be the output of the following Python program?


mylist = [1, 2, 3]
mylist.append(4)
print(mylist)
a) [1, 2, 3]
b) [1, 2, 3, 4]
c) [4, 1, 2, 3]
d) [1, 4, 2, 3]
16. Which of the following represents a dictionary in Python?
a) ['apple', 'banana', 'cherry'] b) (1, 2, 3)
c) {'name': 'John', 'age': 15} d) 'hello'

17. What data type is used for decimal numbers in Python?


a) Integer b) Float c) String d) List

18. Which of these is a valid Python tuple?


a) [1, 2, 3] b) (1, 2, 3) c) {1, 2, 3} d) 1, 2, 3

19. What type of values do we store in an array in Python?


a) same type of data b) Different types of data

20. Which operator is used to add two numbers in Python?


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

21. Which operator is used to check if two values are equal?


a) == b) != c) <= d) >

22. Which operator is used for logical AND in Python?


a) & b) && c) and d) ||

23. What will be the output of the following Python program?


x=2
result = x ** 2
print(result)

a) 22 b) 2 c) 4 d) 0

24. Which of the following operators is used to assign a value to a variable?


a) == b) = c) ! = d) +=

Section D: Loops and Conditional Statements


25. Which of the following is the correct syntax for a for loop in Python?
a) for i in range(5): b) for 1 to 5: c) for i = 1 to 5: d) None of the above
26.What is the primary use of a for loop in Python?
a) To repeat a block of code at a fixed number of times
b) To calculate the square root of a number
c) To read a file from the beginning to the end
d) To perform a mathematical operation on numbers

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


for i in range(3):
print(i)
a) 0 1 2 b) 1 2 3 c) 0 1 2 3 d) 3 2 1

28. What will this code output?


if 10 > 5:
print("Yes")
else:
print("No")
a) Yes b) No c) Error d) None

29. Is the following Python program correct or incorrect?


i=0
while i < 5:
print(i)
i += 1

a) Correct b) Incorrect

30. Is the following if-else syntax correct or incorrect in Python?


x=15
if x > 10:
print("Greater")
else:
print("Smaller or equal")

a) Correct b) Incorrect

You might also like