Comprehensive Python

Table Of Contents:

Python datatypes Questions

Instructions

SECTION A: Multiple Choice (40 Marks)


: define a variable
Is a collection of items, separated by commas, enclosed in square brackets
Is a container for holding data
I'm not sure


: I have ['Bananas', 'Onions', 'Oil'] for my shopping, what name is given to such collection?
Tuple
Shopping
List

: My name is Amin, and my Surname is Matola; which one is a suitable collection:
person = ['Amin', 'Matola']
person = 'Amin Matola'
person = {'Name': 'Amin', 'Surname': 'Matola'}

: The following is a best example of a python Tuple
{'Name': 'Amin', 'Surname': 'Matola'}
['Amin', 'Matola'}
('Amin', 'Matola')


: The following python Code will print "Hello world!" to a python console.
>>> console.log("Hello world")
>>> Print("Hello world!")
>>> print("Hello world!")






You may invite friends on Whatsapp to take this test.