Module 2

studied byStudied by 5 people
4.0(1)
Get a hint
Hint

What do comments start with

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 151 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 43 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 15 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 91 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)

Explore top flashcards

flashcards Flashcard372 terms
studied byStudied by 75 people
Updated ... ago
5.0 Stars(5)
flashcards Flashcard76 terms
studied byStudied by 15 people
Updated ... ago
4.0 Stars(1)
flashcards Flashcard64 terms
studied byStudied by 51 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard60 terms
studied byStudied by 15 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard62 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard25 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard63 terms
studied byStudied by 213 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard58 terms
studied byStudied by 23 people
Updated ... ago
5.0 Stars(1)