Programming fundamentals Flashcards

1
Q

What is sequence

A

Statements are written one after the other

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

What is selection

A

involves if, else or case statements

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

What is iteration

A

repetition of a certain statement.

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

What is casting?

A

converting data to another data type

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

How do you slice in python bitch

A

a = [1,2,3,4,5,6]
print(a[0:7])
light work

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

What are the SQL commands

A

Select
From
Where

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

How do you open a file in python

A

file = open(“textfile.txt”, “w”)

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

How to read an entire file in python

A

for i in file:
print(i)

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