Module 7 Flashcards
What is the difference between a list and a tuples in python?
- Lists can be changed and tuples can’t be changed.
- List are declared using [] and tuples using ()
What the // operator does?
It divides two operands and grounds the result.
Ex: 5 / 3 = 1.666666…
5 // 3 = 1.
What is half-splitting?
An approach for troubleshooting. It works by isolating an error to one section.
Why to use the “one step at a time” approach?
It helps to remove confusion.
What is IaaS?
Cloud services called: Infrastructure as a Service.
Hardware: Storage, computing resourcers.
Software: Server computers (to make the resourcers offered work)
What is PaaS?
Cloud services called: Platform as a Service.
OS + Application Stack.
Ex: Linux + apache, mysql and PHP.
What is SaaS?
Cloud services called: Software as a Service.
MS Word online.
What are the big cloud services providers?
AWS from amazon.
Azure from Microsoft.
Google cloud.
What the string function does?
Converts any data type to string.
Ex:
x = 500
listA = []
listA.append(str(listA))
[‘500’]
What the float function does?
Return a floating point number from an interger or string.
Ex:
k = float(699)
print(k)
699.0
print(float(‘500’))
500.0
What the length function does?
Gets the length (number of characters) of a variable (such as a string or integer).
print(len(‘1234’))
4
What the integer function does?
Change a float to a interger.
print(int(291.3))
291
What the round function does?
Round a number to the nearest whole number.
print(round(29.76521))
30
How can you delete a variable in python?
x = 15
print(x)
15
del x
print(x)
error
How do you use if statement in python?
if x <= 15:
do something
elif:
do another thing
else:
do this