WorksheetsList and Numerical Data
Total questions: 30
Worksheet time: 2hrs 30mins
When using adding, subtraction, or multiplication with an integer what do you return?
Float
integer
Binary
Hexadecimals
What are the two main numerical data types?
Binary, Hexadecimals
Octal, Integer
Float, Binary
Integrer, Float
When adding a comment to a program you must add what to the front of the line.
()
#
@
<>
What is the correct format for defining a variable?
front_door = 'Blue'
Cookies='vanilla'
username="Gigigi"
gender = (male)
What is a string made up of?
10 or more characters
only one character per string
one or more characters
numerical data only
When you want to perform an action on a string what function do you use?
Type function
strip function
String method function
string function
How do you insert the value from a variable into a string?
print {f 'hello my dear friend, (name)!)
print"f"(Hello my dear friend [name] !)
print['f' "Hello my friend,{name} !]
print( f"Hello my dear , { name } ! " )
What is a compact way of defining a list in one line?
Sorting List
Numerical List
List Comprehension
Tuples
What do you use to create a numerical list?
The range() function
the odd() function
The round() functions
The pop()
When you sort a list without affecting the original list what function do you use?
Sort()
num()
index()
Sorted()
When sorting a list what sort function do you use?
round() Function
Sort() function
Bin() Function
Sorted() function
What loop lets you work with each item in a list one item at a time?
While Loop
For Loop
Do While Loop
Do Loop
What can you do with a copy of a list?
Make another copy
work with it
Work with it without affecting the original list
So you can slice it
A slice is a part of a list that
begins with the item at the first index and end with the item before the last index.
begins with the item at the last index and end with the item at the first index.
omits the first and last item in the list
begins with third item in the list and end with the last item in the last
What is a collection of items in a specific order and in square brackets?
Reverse sorting list
String List
Comprehension List
List
What programming Language are we using?
Python Script
Java Script
CICS
Python
What is the Level and Version of Python are we using?
level 7 Version 1or 5
level 2 Version1 1
level 3 Version 8 or 9
level 3 Version 6
When using the division operation what numerical data is returned in all cases?
Hexadecimal
Integer
Float
Binary
What is the purpose of the Type() function?
To make sure that the program is typed correction
identifies the data type of its argument.
Compute complex code
It clears the data field in all data types.
Why do you write comments in your programs?
It makes the program look good
Makes the program run better
It tells the program what to do
Allow you to leave notes for yourself and others inside a program.
What is a Tuple
an ordered collection of items that can't be modified
an ordered collection of items that can be modified
an ordered collection of items that is changeable with parentheses
an ordered collection of items that are numbers in quotations
What is the purpose of () in a function?
To write a definition inside of it
Serve no purpose
The section were the parameter or parameters are listed.
Indicates that it is a function
What is a variable?
something that is a name
Is a label for a value you want to use in a program
A label that has not value
A label that has a under_score.
When naming a variable what kind of quotation marks are used?
Only " "
Only ' '
Both " and =
Both " " and ' '
When using the remove() function what does it do to list?
It remove the beginning of a list
It remove the items in the middle of a list
it remove a specific items from the list
It only remove the end of a list
What must a variable contain?
only numbers
Only underscores
numbers and underscores
Numbers, underscores and Letters
What must a variable start with?
Only numbers
Only underscores
Only letters and underscores
Only letters
How do the remove() function work?
This function remove the whole list
This function removes a specific item from a list
This function remove the first item from the list
This function remove the last item from the list
The pop() function will do the following
Remove and return the last item in a list and can also accept an index and will remove and return the item at that index.
Return a item in a list and can also accept an index and will return the item at that index.
Remove three items in a list and can also accept three index items.
If a item appears more than once use the pop() to delete it.
What happen when you modify an element in a Tuple?
It changes the element position in the Tple
You will get an error.
It will sort the Tuple
The Tuple reverse it sort back to the original Tuple
