Structure of Algorithm and Programming Chapter 5

studied byStudied by 250 people
5.0(2)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

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 11 people
1117 days ago
5.0(1)
note Note
studied byStudied by 19 people
836 days ago
5.0(1)
note Note
studied byStudied by 469 people
761 days ago
5.0(1)
note Note
studied byStudied by 6 people
799 days ago
5.0(1)
note Note
studied byStudied by 27 people
720 days ago
4.0(2)
note Note
studied byStudied by 36 people
834 days ago
4.5(2)
note Note
studied byStudied by 8 people
540 days ago
5.0(1)
note Note
studied byStudied by 214 people
672 days ago
5.0(2)

Explore top flashcards

flashcards Flashcard (20)
studied byStudied by 9 people
756 days ago
5.0(1)
flashcards Flashcard (74)
studied byStudied by 52 people
737 days ago
4.8(8)
flashcards Flashcard (108)
studied byStudied by 9 people
25 days ago
5.0(2)
flashcards Flashcard (169)
studied byStudied by 20 people
64 days ago
5.0(3)
flashcards Flashcard (39)
studied byStudied by 45 people
811 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 3 people
679 days ago
5.0(1)
flashcards Flashcard (38)
studied byStudied by 92 people
394 days ago
5.0(1)
flashcards Flashcard (33)
studied byStudied by 6 people
756 days ago
5.0(1)
robot