History of Python and general maths operations Flashcards

1
Q

What is a script?

A

A program that uses an interpreter to execute its instructions, interpreted instructions execute slower because one script instruction can take multiple interpreter instructions

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

What is an interpreter?

A

A program that reads and executes the instructions from a script

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

What language did python derive from?

A

ABC,
- Pythons name came from a TV show:
Monty Python

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

Is python open source?

A

Yes so people can make new interpreters

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

Who created Python and when?

A

Guido van Rossum in the late 1980s:
Python was first released in 1994

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

What is machine code?

A

The most basic code for a device, binary
- strings of binary create instructions and these instructions create an executable program

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

What is an assembler?

A

A program that translates human readable code from an ‘assembly language’ into machine code so it can be executed by the program
- benefits of an assembler allowed us to interpret what we were coding and make more complex programs

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

What are high-level languages?

A

Similar to assembly languages but on a more extreme scale, they allow us to use formulas and algorithms to write complex code

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

What is a compiler?

A

Translates high-level language into low-level machine instructions

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

What is RAM?

A

Volatile storage with faster access usually located off the processor chip

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

What is an operating system?

A

Manages programs and interfaces with peripherals

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

What is Moore’s law?

A

The doubling of integrated circuits (IC) transistor capacity roughly every 18months

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

What is cache?

A

Relatively small, volatile storage located on the processor

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

What is a disk/HDD/SSD?

A

Non-volatile storage with slower access

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

What is a clock?

A

Hardware that measures the speed at which a processor executes instructions

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

What is an interactive interpreter?

A

A program that allows the user to execute the code line by line

17
Q

What is a statment?

A

A program instruction, usually appears on one line

18
Q

What are expressions?

A

Code that returns a value when executed

19
Q

What is used to develop code?

A

Integrated Development Environment (IDE)
- Python uses IDLE which provides a basic environment for editing and running programs

20
Q

What is the function of x / y (division)?

A

Divides x by y
- results in a float

21
Q

what is the function of x // y?

A

Floor division, rounds down the division of x and y to the nearest whole number
- results in a integer

22
Q

What is the function of x % y?

A

Modular division, finds the remainder of x / y
- results in an int

23
Q

What is the function of celi(x)?

A

ceiling function, round up x
- results int

24
Q

What is the function factorial(x)?

A

The factorial of x…
- results int

25
Q

What is the function of fmod(x,y)?

A

Remainder of x / y,
- same as % function
- results float

26
Q

What is the function of exp(x)?

A

e^x
- results float

27
Q

What is the function of pow(x,y)?

A

x^y
- results in float

28
Q

What is the function of fabs(x) and abs(x)?

A

absolute value of x
- fabs() results in a float at all times
- abs() results in an int unless necessay

29
Q

What is the function of floor(x)?

A

Rounds down x to nearest int
- results in int

30
Q

What is the function of sqrt(x)?

A

Positive square root of x
- results in float

31
Q

What is the function of:
acos(x)
asin(x)
atan(x)
cos(x)
sin(x)
tan(x)

A

As written
- results in float

32
Q

What is the function of hypot(s1,s2, …sn)

A

The length of a vector from the origin using multiple existing vector inputs,
- can also be used to find the hypotenuse of a triangle after inputting two vectors/side
- results in float

33
Q

What is the function of radians(x) and degrees(x)

A

Converts to radians or degrees
- results in float

34
Q

What is the order of operations?

A

Parentheses
Indices
Positive and negative argument
* / // % (first come first serve)
+ -
< > >= <= != == (first come first serve)
Not
And
Or