Font size
WorksheetsCOMP2_Quiz1
Total questions: 23
Worksheet time: 16mins
It is a general-purpose interpreted, interactive, object-oriented, and high-level programming language.
(a)
Who created Python Programming Language?
(a)
It is used by Python to indicate a code block
Indetation
New Line
Semi colon
Curly braces
Square bracket
It is used by Python to end a command/statement
Indetation
New Line
Semi colon
Curly braces
Square bracket
These are containers for storing data values.
Variables
Data Types
Comment
Input() Function
These are the classification of data assigned to a variable.
Variables
Data Types
Comment
Input() Function
It is the term for converting one data type into another data type.
Casting
Concatenate
Comment
Input() Function
It is the term for joining two strings together
Casting
Concatenate
Comment
Input() Function
This code is used to accept input from the user
Casting
Concatenate
Comment
Input() Function
It is added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.
Casting
Concatenate
Comment
Input() Function
It is the sign used for single line comment in Python
# (Hash Sign)
// (Double Slash)
/* */ (Slash asterisk at the beginning and asterisk slash at the end)
''' ''' (Triple single quote at the beginning and triple single quote at the end)
It is the sign used for multiple line comment in Python
# (Hash Sign)
// (Double Slash)
/* */ (Slash asterisk at the beginning and asterisk slash at the end)
''' ''' (Triple single quote at the beginning and triple single quote at the end)
In Python, a variable is created the moment you first assign a value to it
TRUE
FALSE
In Python, you must declared first the data type followed by the variable and lastly will be the value assigned to a variable
TRUE
FALSE
Python is like C++ in naming variable they both case sensitive and follows the common programming convention of variable naming
TRUE
FALSE
Python is a dynamically-typed language
TRUE
FALSE
In Python we can concatenate number with string without declaring the number as string
TRUE
FALSE
Python accepts single ('), double (") and triple (''' or """) quotes to denote string literals, as long as the same type of quote starts and ends the string
TRUE
FALSE
The triple quotes are used to span the string across multiple lines.
TRUE
FALSE
All characters after the # and up to the end of the physical line are part of the comment and the Python interpreter ignores them
TRUE
FALSE
A line containing only whitespace, possibly with a comment, is known as a blank line and Python totally ignores it.
TRUE
FALSE
Enumerate at least 5 data types in Python (Separate your answers by comma, do not hit enter unless you're done with this item)
Enumerate the 4 characteristics of Python (Separate your answers by comma, do not hit enter unless you're done with this item)
