Structure of Algorithm and Programming Chapter 5

studied byStudied by 250 people
5.0(2)
Get a hint
Hint

Python

1 / 52

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

53 Terms

1

Python

A popular programming language, released in 1991.

New cards
2

The use of Python

Web development (server-side), Software development, Mathematics and System scripting.

New cards
3

The creator of Python

Guido van Rossum

New cards
4

Integrated Development Environment (IDE)

Allows common activities of writing software and identify programming errors.

New cards
5

Syntax Errors

Refers to the structure of a program and the rules about that structure.

New cards
6

Runtime Errors

Also called exceptions, usually indicate that something exceptional (and bad) has happened.

New cards
7

Logic Errors

Code will run successfully but the output is not expected.

New cards
8

Indentation

The spaces at the beginning of a code line to indicate a block of code and must be at least one.

New cards
9

Comment and Documentation strings

Use for the purpose of in-code documentation.

New cards
10

Comments

Start with #

New cards
11

Documentation string or docstring

Statements that is included within the triple quote """.

New cards
12

Comment

#This is a message

New cards
13

Documentation

“““

This is a message

“““

New cards
14

Reserved words

Have predefined meaning and syntax in the language.

New cards
15

Variables

The containers for storing data values.

New cards
16

Variables name

  • must start with a letter or underscore.

  • can only contain alpha-numeric characters and underscores

  • case- sensitive

  • cannot use keywords

New cards
17

Text Type

str

New cards
18

Numeric Type

int, float, complex

New cards
19

Boolean Type

bool

New cards
20

Sequence type

list, tuple, range

New cards
21

Set type

set

New cards
22

Binary type

bytes, bytearray, memoryview

New cards
23

int

45

New cards
24

float

45.0

New cards
25

str

“hello”

New cards
26

complex

1j

New cards
27

complex

1+9j

New cards
28

complex

9j+5

New cards
29

list

[23,42,54,”hello”]

New cards
30

tuple

(23,43,54,”hello”)

New cards
31

tuple((23,43,56))

tuple

New cards
32

list((9,4,3,2,6))

list

New cards
33

Arithmetic Operator

+, - , * , / …

New cards
34

Addition

+

New cards
35

Subtraction

-

New cards
36

Multiplication

*

New cards
37

Division

/

New cards
38

Modulus

%

New cards
39

Exponent

**

New cards
40

Floor division

//

New cards
41

Relational Operator

>,<,==,<=,>= …

New cards
42

More than

>

New cards
43

Less than

<

New cards
44

Equal

==

New cards
45

Not Equal

!=

New cards
46

More than or equal to

>=

New cards
47

Less than or equal to

<=

New cards
48

Logical Operator

not, and, or …

New cards
49

not

not True

New cards
50

and

True = True + True

False = True +False

False = False + False

New cards
51

or

True = True + True

True = True + False

False = False + False

New cards
52

input() function

Ask input from the user

New cards
53

print() function

Displays the output and jump to the next line.

New cards

Explore top notes

note Note
studied byStudied by 88 people
... ago
5.0(1)
note Note
studied byStudied by 14 people
... ago
5.0(1)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 419 people
... ago
5.0(1)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 7 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (96)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (841)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (51)
studied byStudied by 18 people
... ago
5.0(1)
flashcards Flashcard (45)
studied byStudied by 1377 people
... ago
5.0(4)
flashcards Flashcard (36)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (25)
studied byStudied by 20 people
... ago
5.0(2)
flashcards Flashcard (108)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (81)
studied byStudied by 3 people
... ago
5.0(1)
robot