Module 2

studied byStudied by 5 people
4.0(1)
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 / 32

flashcard set

Earn XP

Description and Tags

33 Terms

1

What do comments start with

a #

New cards
2

Lines of code can be categorized into three categories. What are they?

Input, processing, and output

New cards
3

Input statements

used to get data and pass it onto the program for processing

New cards
4

Processing Statements

Implement logic that is used to process the input and turn it into useful information

New cards
5

Output statements

used to display information on the screen

New cards
6

Algorithm

list of well defined computer instructions that can be used to solve a problem

New cards
7

program/source code/ code

List of statements that implement an algorithm using a programming language like python

New cards
8

variables

hold data that we can reuse in our program by writing the same variable name

New cards
9

Assignment Operator

right of the = is executed first, and result is assigned to the variable on the left

New cards
10

print

built in function to output data on the console

New cards
11

Debugging

process of finding bugs in your programs and sorting them out

New cards
12

Syntax Errors

language mistakes done by a programmer while writing code

New cards
13

Logic Errors

Algorithm that is used in the program is wrong.

New cards
14

String vs. Numbers

Strings include quotations, numbers do not

New cards
15

Rules for naming variables

  1. consist of upper, lower letters, underscore, and numbers only

  2. can only start with a letter or an underscore

  3. case sensitive

  4. cannot be the same as python reserved keywords

New cards
16

Strings

composed of one or more characters. Indicated by enclosing a value in single, double, or triple quotes

New cards
17

Escape Character “\”

changes the meaning of the character, appearing immediately afterwards

New cards
18

What can numbers be

Integers or Floating Point Numbers

New cards
19

Ints vs Float

Ints are whole numbers without a decimal point, floars have a decimal point

New cards
20

type

name of the built in function and we need to provide a variable as argument to this function

New cards
21

Typecasting

convert a value from one datatype to another datatype

New cards
22

What happens if you typecast a float into an integer

number is rounded down

New cards
23

What does input always read user data as

a string.

New cards
24

Formatted Output

Modifies the output according to the given pattern.

New cards
25

Multiline Strings

Triple Quotes

New cards
26

every program should have a __, and every expression should have a ____

statement, variable/literal

New cards
27

What is //

Floor Division Operator

New cards
28

What does // do

rounds float down to nearest whole number

New cards
29

How can you tell if it is a logical expression

uses and/or

New cards
30

what does ** do

exponent

New cards
31

What does / print

float

New cards
32

What does % print

int

New cards
33

Overflow

when a value is too large to be stored in the memory allocated by the interpreter

New cards

Explore top notes

note Note
studied byStudied by 89 people
890 days ago
4.5(4)
note Note
studied byStudied by 11 people
879 days ago
5.0(1)
note Note
studied byStudied by 1 person
20 hours ago
4.0(1)
note Note
studied byStudied by 19 people
979 days ago
5.0(1)
note Note
studied byStudied by 22 people
799 days ago
5.0(1)
note Note
studied byStudied by 15 people
816 days ago
5.0(1)
note Note
studied byStudied by 11 people
965 days ago
5.0(1)
note Note
studied byStudied by 127 people
616 days ago
5.0(1)

Explore top flashcards

flashcards Flashcard (21)
studied byStudied by 5 people
635 days ago
5.0(1)
flashcards Flashcard (23)
studied byStudied by 2 people
148 days ago
5.0(1)
flashcards Flashcard (32)
studied byStudied by 26 people
391 days ago
5.0(1)
flashcards Flashcard (173)
studied byStudied by 1 person
13 days ago
5.0(1)
flashcards Flashcard (55)
studied byStudied by 14 people
760 days ago
5.0(3)
flashcards Flashcard (30)
studied byStudied by 18 people
445 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 7 people
361 days ago
4.0(1)
flashcards Flashcard (84)
studied byStudied by 74 people
352 days ago
5.0(1)
robot