Crash Course on Python Flashcards

1
Q

What is a script?

A

A script is a program that is short, simple, and can be written very quickly.

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

What are semantics and syntax?

A

The syntax is the rules for how each instruction is written and the semantics are the effects the instructions have.

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

What is automation?

A

Automation is the process of replacing a manual step with one that happens automatically.

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

What are some benefits of automation?

A

It can also save time, reduce errors, increase consistency, and provide a way to centralized solutions and mistakes making them easier to fix.

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

What are some tasks that aren’t suited for automation?

A

They may require a degree of creativity or flexibility that automatic systems can’t provide or for more complicated or less frequently executed tasks creating the automation may actually be more effort or cost than it’s worth.

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

When was Python releases?

A

Its first version was released by Guido van Rossum back in 1991

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

What is Python for?

A

You can use Python to calculate statistics, run your e-commerce site, process images, interact with web services, and do a whole host of other tasks. Python is perfect for automation. It lets you automate everyday tasks by writing simple scripts that are easy to understand and easy to maintain.

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

What are functions?

A

Functions are pieces of code that perform a unit of work.

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

What are keywords?

A

Keywords are reserved words that are used to construct instructions.

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

How do you determine the data type?

A

type()

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

What is an expression?

A

An expression is a combination of numbers, symbols or other variables that produce a result when evaluated.

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

How are variables named?

A

Variable names can’t have any spaces and they must start with either a letter or an underscore. Also, they can only be made up of letters, numbers and underscores.

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

What is implicit conversion?

A

The interpreter automatically converts one data type into another.

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

Display a function header.

A

def name(parameter, parameter):

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

What is refactoring?

A

Rewriting code to be more self-documenting.

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