Which logical operator are we using in the following code snippet?*
age = 15
if age > 12 and age < 20:
print("You are a teenager.")
and
<
>
=
12 answers
and
Which of the following is the correct syntax to define a dictionary:*
user_details = { "djs", "admin" }
user_details = { "username": "djs", "role": "admin" }
user_details = [ "username": "djs", "role": "admin" ]
user_details = { "username", "djs" : "role", "admin" }
user_details = { "djs", "admin" }
user_details = { "username": "djs", "role": "admin" }
user_details = [ "username": "djs", "role": "admin" ]
user_details = { "username", "djs" : "role", "admin" }
user_details = { "username": "djs", "role": "admin" }
Which function is used to remove an item from a dictionary?*
dict.remove()
dict.delete()
dict.pop()
dict.destroy()
dict.remove()
dict.delete()
dict.pop()
dict.destroy()
dict.pop()
Which function is used to get all of the keys from a dictionary?*
dict.keys()
dict.values()
dict()
None of the options
dict.keys()
dict.values()
dict()
None of the options
dict.keys()
Which of the following is a data structure?*
int
list
float
bool
int
list
float
bool
list
Which data type is returned by the `input()` function?*
str
int
float
It depends on what the user enters when they respond to the `input()` function
str
int
float
It depends on what the user enters when they respond to the `input()` function
str
What is the index number of "tacos" in this list:*
foods = ["tacos", "burritos", "nachos"]
1
0
3
2
foods = ["tacos", "burritos", "nachos"]
1
0
3
2