wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

tic tac toe with ai

Total questions: 20

Worksheet time: 48mins

Name
Class
Date
1.

Which keyword is used to define a function in Python?

a)

function

b)

execute

c)

define

d)

def

2.

What is the purpose of the random.choice() function in Python?

a)

Generate random numbers

b)

Select a random item from a sequence

c)

Sort a list

d)

Shuffle a list

3.

Which of the following is an example of a built-in function in Python?

a)

len()

b)

random.choice()

c)

print()

d)

def

4.

What is the purpose of conditional statements in Python?

a)

To make decisions based on conditions

b)

To execute a specific task

c)

To make random selections

d)

To store values

5.

What is the purpose of variables in Python?

a)

To create an infinite loop

b)

To store values

c)

To make random selections

d)

To execute a specific task

6.

which of the following is the correct syntax for creating a variable in python?

a)

var x = 5

b)

x = 5

c)

create x = 5

d)

x := 5

7.

which of the following is the correct syntax for creating a list in python?

a)

list = [ 1,2,3 ]

b)

( 1,2,3 )

c)

{ 1,2,3 }

d)

" 1, 2, 3"

8.

which of the following terms represent each data item in list?

a)

unit

b)

element

c)

index

d)

dimension

9.

The data passed inside a function is known as_________

a)
output
b)

argument

c)
parameter
d)
variable
10.

Each element in a list can be accessed using an _________ value

a)
password
b)

aphabet

c)
equation
d)
index
11.

We can use the __________ operator to check two condition

a)

def

b)

of

c)

in

d)

and

12.

Which is not a Data Type

a)

float

b)
String
c)

boolean

d)

loop

13.

In coding to check the horizontal win condition of the tic tac toe game?

a)

b[0] = icon and b[1] = icon and b[2] = icon

b)

b[0] = icon and b[4] = icon and b[8] = icon

14.

Which loop will run until the condition is False?

a)

While

b)

for

c)

range

d)

in

15.

To check multiple condition

a)

Elif

b)

Else

c)

If

16.

This language is easy to learn and is one of the most popular language for AI today

a)

C++

b)

JAVA

c)

RUBY

d)

PYTHON

17.

1. Which one of the following is an application of AI?

a)

Remote controlled Drone

b)

Self-Driving Car

c)

Self-Service Kiosk

d)

. Self-Watering Plant System

18.

what is full form of AI

a)

artficial improvement

b)

artificial input

c)

artificial intelligence

d)

application intelligence

19.

Alexa is an example of AI.

a)

True

b)

Flase

20.
In the following code, "city" is an example of a what?
a)
List
b)
Loop
c)
Variable
d)
Array