OCU Test - Day 1 Review Flashcards

1
Q

True or False: Python is a proprietary, expensive, difficult-to-learn language owned by Microsoft?

A

False

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

What is a literal?

A

A hard-coded instruction - literally this string, this number, etc.

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

What is the character for single-line comments?

A

#

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

What is the escape sequence for a single quote within a string?

A

'

‘I don't want eggs for breakfast.’

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

What is the character limit for a single line according to the Python Style Guide?

A

79 characters

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

What are the three keywords for conditional “IF” flow control structures?

A

if, elif, else

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

Does python use braces for controlling application flow?

A

No - it uses tabs - spacing!

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

Does python use static or dynamic data typing for variables? (Hint: duck typing)

A

Dynamic typing - duck typing - if it walks like a duck and acts like a duck… it’s a duck!

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