All Python From 1 To 23 Flashcards

1
Q

#

A

octophorne, pound character used to comment out lines

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

+

A

Plus

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

-

A

Minus

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

/

A

Slash- division

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

*

A

Asterisk- multiplication character

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

%

How does it work

A

Modulus
X devided by Y with J remaining
The result of % is the J part

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

Less then

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

>

A

Greater than

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

<=

A

Less then equal

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

=>

A

More then equal

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

PEMDAS

A

Parenthesis, Exponents, Multiplication, Division, Addition, Subtraction

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

X**Y

A

X to the Y power

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

A//B

A
// is used to perform floor division.
The expression 100//40 will return the value of 2. Floor division is useful when you need a quotient to be in whole numbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Variable

A

A name for memory storages of strings, numbers

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

Between_ beetwen

A

Underscore character

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

=

A

Assigns value on the right to the variable on the left

17
Q

==

A

Tests wether two values are equal

18
Q

f“text and {some car}”

A

One way of formatting the string

19
Q

“Something {} “.formatter(“player”)

A

Another way to format a string

20
Q

True “and” False

A

Python recognises

True and False as keywords representing the concept of true and false

21
Q

“””something

something”””

A

Allows you to write every place

22
Q

\

A

Backslash- \

23
Q

\’

A

Single quote - ‘

24
Q

\”

A

Double quote - “

25
Q

\a

A

ASCII Bell - makes the sound «dingg»

26
Q

\b

A

Backspace - deletes one character behind

27
Q

\t

A

Horizontal tab- simple tab

28
Q

\n

A

Line feed - simply moves to the next line

29
Q

\v

A

Vertical tab

does this thing

30
Q

\f

A

Formfeed

does the same thing as\v

31
Q

\r

A

Carriage return - e.g
>print(«Fucking\rHell»)
>helling

32
Q

variable = input()

A

Takes input from the user and assigns it to the variable

33
Q

end =‘ ‘

A

Tell python to not end the line with a newline(\n) character

34
Q

variable = int(input())

A

It gets a number as a string than converts it to an integer using int()

35
Q

Pydoc

A

Open in terminal, to find answers for your questions

36
Q

Debugging

A

Detect and remove errors from…

37
Q

import

A

This is how you add modules to your script from the python feature set. Rather than give you all the features at once, Python asks you to say what you plan to use. This keeps your program small

38
Q

argv

A

Is a argument variable. This variable holds the arguments you pass to your python script when you run it.

39
Q

Script, one, two, three = argv

A

Unpacking the variables