Basics Flashcards

1
Q

Comments

A

( # ) comment

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

Addition, multiplication, subtraction, division

A

( + * - / )

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

Less than, less than or equal, more than, more than or equal

A

( >= )

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

Defining variables numbers

A

NAME = NUMBER

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

Defining variables object

A

NAME = ‘ VARIABLE’

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

Formatter numbers

A

“STUFF and %d” % variable

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

Formatting variables

A

“STUFF and %s” % variable

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

Formatting more than one variable

A

“STUFF and %s and %d” % ( variables in order they appear )

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

Printing

A

Print “STUFF”

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

Formatting in a string

A

“STUFF and %r” = A

Print A % variable

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

Repeat printing

A

“STUFF” * no. of times wanting to repeat

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

What does a comma do at the end of a print followed by another print

A

It makes the following print on the same line as the one with the comma

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

Difference between %r and %s

A

%r is used for debugging, %s is used for displaying

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

How to print a sting with “ or ‘ in

A

You use “”” STUFF “””

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

How to insert a backslash

A

( \ )

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

How to insert a single quote

A

'

17
Q

How to insert a double quote

A

"