python Flashcards

(11 cards)

1
Q

python is a

A

popular general-purpose programming language
- dynamically typed and garbage-collected

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

python supports

A

structured (or procedural), object-oriented, and functional programming

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

python has great

A

extensibility with thousands of modules supporting wide range of functions

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

python uses ________, rather than ________

A

whitespace indentation, {} or keywords to delimit code blocks

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

pros of python-based server-side development

A
  • readability and ease of use
  • extensible libraries and frameworks including use of machine learning and AI
  • increased productivity
  • a large developer community and is easy to receive support
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

cons of python-based server-side development

A
  • slow in performance as an interpretive language
  • lack of parallel execution that impairs scalability
  • high memory consumption
  • not suitable for client-side scripting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

python comments

A

begin with #

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

t/f: you can do single or multi line comments in python

A

false. multi-line not allowed

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

variable naming rules

A
  • do not use space or special characters
  • can be a combination of letters, numbers, and underscores
  • cannot begin with a number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

global variables

A

variables created outside of a function

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

if a variable created inside a function has the same name as a global variable:

A

this variable is local, and can only be used inside the function

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