Anyone Can Code.


Tutorial 2: Quiz 1

Kriish Mehta

Question 1: In Python, strings are

Question 2: Which of the following is a string?

Question 3: What would be the output of the following code?

a = 'Hello'
b = 123
c = "World"
d = a + b + c

Question 4: Which of the following is the correct syntax to assign a string(Hello World) to a variable(x)?

Question 5: Which data type represents a positive or negative whole number?

Question 6: In Python, the imaginary part of a complex number is represented with which letter?

Question 7: Which data type would the following be stored as?

Question 8: A value such as 198.0 would be saved as what kind of variable?

Question 9: Which function can be used to check the type of a variable?

Question 10: The Boolean datatype can represent which of the following values?

Question 11: What is the output of the following code?

list1 = ['hello', 'hi', 'hey']
list2 = ['James', 'Johnny', 'Jeff']
print(list1[2], list2[1])

Question 12: Which of the following is a list?

Question 13: What is the index value of 'hi' in the following list?
['hello', 'hi', 'hey']

['hello', 'hi', 'hey']

Question 14: What is the key difference between a tuple and a list?

Question 15: What is the output of the following piece of code? Which data type is this?

dict = {'greet': 'Hello', 'name': 'James','age': 10}
print(dict['greet'], dict['name'])

Score =

Copyright © 2021, Q-Programming | Created by Arjun Sodhi, Balpreet Juneja and Sammarth Kumar | Developed and Designed by Sammarth Kumar