Module 7 Flashcards

1
Q

What is the difference between a list and a tuples in python?

A
  1. Lists can be changed and tuples can’t be changed.
  2. List are declared using [] and tuples using ()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What the // operator does?

A

It divides two operands and grounds the result.
Ex: 5 / 3 = 1.666666…
5 // 3 = 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is half-splitting?

A

An approach for troubleshooting. It works by isolating an error to one section.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why to use the “one step at a time” approach?

A

It helps to remove confusion.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is IaaS?

A

Cloud services called: Infrastructure as a Service.

Hardware: Storage, computing resourcers.
Software: Server computers (to make the resourcers offered work)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is PaaS?

A

Cloud services called: Platform as a Service.

OS + Application Stack.
Ex: Linux + apache, mysql and PHP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is SaaS?

A

Cloud services called: Software as a Service.

MS Word online.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the big cloud services providers?

A

AWS from amazon.
Azure from Microsoft.
Google cloud.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What the string function does?

A

Converts any data type to string.
Ex:
x = 500
listA = []
listA.append(str(listA))
[‘500’]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What the float function does?

A

Return a floating point number from an interger or string.
Ex:
k = float(699)
print(k)
699.0
print(float(‘500’))
500.0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What the length function does?

A

Gets the length (number of characters) of a variable (such as a string or integer).

print(len(‘1234’))
4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What the integer function does?

A

Change a float to a interger.

print(int(291.3))
291

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What the round function does?

A

Round a number to the nearest whole number.

print(round(29.76521))
30

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can you delete a variable in python?

A

x = 15
print(x)
15
del x
print(x)
error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you use if statement in python?

A

if x <= 15:
do something
elif:
do another thing
else:
do this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you use for in python?

A

for counter in range (10, 4, -1):
print(counter)

17
Q

How do you use while in python?

A

counter = 0
while counter < 22:
do something
counter += 1

18
Q

How do you create a dictionary python?

A

birthdays = {‘Rodrigo’ : ‘March’, ‘Marcela’ : ‘March’, ‘Adriano’ : ‘May’}

*** del birthday[‘rodrigo’]