NEW
Font size
Worksheetschatbot python
Total questions: 20
Worksheet time: 3600secs
Which keyword is used to define a function in Python?
define
function
def
execute
What is the purpose of variables in Python?
Store values
Execute tasks
Make decisions
Create dictionaries
What is the purpose of a dictionary in Python?
Make decisions
Create key-value pairs
Store values
Execute tasks
What is the keyword used to create an infinite loop in Python?
for
break
while True
if
Which of the following statements will assign the value 5 to the variable Z in Python?
z < 5
Z - 5
Z = 5
Z==5
Which Python keyword is used to check multiple conditional statements?
if
elif
else
for
output of this code
1
5
6
any one of the value
A ____________chatbot is trained to perform a specific task
Emotional
Rule based
A ______ is used to store information
variable
input
string
output
To exit a ______ loop the condition must be false.
for
while
gaint
in
Correct Syntax for define List.
[ ]
{ }
( )
" "
What are the values written in list are called?
Element
Data
Code
Entry
how to write random Choice
random.choice
random.choise
choice.random
random.random
Which function takes input from a user?
input
import
variable
complete the following code:
if "popular place " in variable:
______("Rishikesh")
input
def
Which statement checks the condition of user input
if -elif- else
elif
while
break
What will be the output of following code?
Exam = 3+4
print("Exam")
Exam
3+4
7
what is a loop?
which repeat the code
input the user values
system in ai
Ai based chatbot
if you want to print 2 element of this list what should you code?
x = [ 1,2,3,4,5,6]
print[x]
print(x[0])
print[1]
print(x[1])
what is a python
snake
code
language
program
