Python 3 Basics Flashcards

1
Q

In Python, how are code blocks created?

A

Using indentation rather than curly braces.

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

Comment on Python’s programming paradigm and on how variables are declared with it.

A

Python is completely object oriented, and not “statically typed”. You do not need to declare variables before using them, or declare their type. Every variable in Python is an object.

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

What types of number are supported in Python?

A

Integers (whole numbers), Floats (decimals) and Complex Numbers

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

What is the difference between using single and double quotes for strings?

A

The difference between the two is that using double quotes makes it easy to include apostrophes (whereas these would terminate the string if using single quotes)

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

Can multiple assignments be made at the same time in python?

A

Yes.

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

In python, can you add numbers to strings?

A

No.

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