PCEP Flashcards

1
Q

What does a compiler do?

A

Transfer code from one type to the other

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

What does a interpreter do?

A

Makes sure it is executed inmediately

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

What are keywords

A

Keywords are reserved words that can’t be used as a variable

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

How is code evaluated

A

Line-by-line

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

What does REPL stand for

A

Read, Evaluate, Print, Loop

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

What is the sign for a comment

A

#

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

Can you create block comments

A

no

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

With what operator can you check if a nymber divides evenly

A

%

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

What is the escape character

A

\

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

What is the newline character?

A

n

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

What is the result of the input function

A

a string

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

How can we avoid printing a newline when using the print function?

A

By setting end=’’ when calling the function.

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

Are lists immutable or mutable

A

mutable

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

Does list type have set method

A

no

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

How can you change a list

A

names.insert(place of characters, ‘name’) names[number] = ‘name’

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

what does this do? [::-1]

A

reverses the list

17
Q

Do dictionary’s have the append method?

A

no

18
Q

How many keyword arguments does print(0) have

A

2

19
Q

How can you separate output from Print(string is string)

A

sep=”-“

20
Q

What are keyword arguments

A

arguments whose meaning is not dictated by their position, but by a special keyword

21
Q

What are positional arguments

A

arguments whose meaning is dictated by their position