Section 1

Preview this deck

Computer Components

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (39)

Section 1

(39 cards)

Computer Components

Front

CPU Main Memory-RAM Input/Output Secondary Memory-Hard Disk

Back

Language Levels

Front

Machine Language Assembly Language High-Level Language Python is a High-Level Language Fourth Gen Language

Back

Binary

Front

Memory location is composed of bits, a processor stores a number using base 2

Back

CPU

Front

Machine language in Binary Using an Interpreter or a Compiler to translate to bits

Back

If Statements

Front

If Elif Else

Back

Basic Task of Decomposition

Front

Breaking a problem into pieces

Back

Input/ Output

Front

To prompt user

Back

Nested If-else

Front

user_choice = 2 num_items = 5 if user_choice == 1: print('user_choice is 1') elif user_choice == 2: if num_items < 0: print('user_choice is 2 and num_items < 0') else: print('user_choice is 2 and num_items >= 0') else: print('user_choice is neither 1 or 2')

Back

String formatting

Front

%d int %f float %s String %x Hexadecimal %e Floating-point exponential format

Back

Problem Solving

Front

Understand Design Interpret-programming Test

Back

Object Types

Front

int() float() input() print()

Back

Mutability vs Immutable

Front

Mutable Objects values can be changed Immutable Objects values cannot be changed

Back

String

Front

Sequence type immutable

Back

( ) Immutable

Front

tuple

Back

Computational Thinking

Front

Creating a sequence of instruction to solve a problem using algorithms

Back

string concatenation

Front

A program can add a new character to the end of a string

Back

Using Methods- Dictionary

Front

Add Dict[k] = value mapDict[ 'Montana'] = 'Missoula' Modify existing Dict[k] = value mapDict[ 'Montana'] = 'Helena' Remove Del del[k] Del map['Montana']

Back

{ 'string': value, 'Car Wash': 35}

Front

Dictionary

Back

Determine Odd & Even

Front

num= int(input()) if num % 2 == 0: print('even') elif num % 2 == 1: print('odd') else: print('no value')

Back

string literal

Front

String literal A string value specified in the source code of a program

Back

{ } Immutable

Front

Set

Back

len()

Front

Built-in function can be used to find the length of a string Get the length of a string, number of characters

Back

Modulo Operator

Front

% Evaluates the remainder of the division of two integers operands 23 % 10 = 3

Back

Error Types

Front

Syntax error Violate a language rules on how symbols can be combined to create a program Runtime error Program attempts an impossible operation(i.e str / 0) Logic error Logically flawed Often called a bug

Back

[ ] mutable

Front

List

Back

Using Methods- List

Front

append() list.append(value) pop() list.pop(i) i = index remove() list.remove(value)

Back

Division

Front

/ Always returns a float 2.0

Back

Variable

Front

Used to remember a value for later use

Back

Volatile vs Non-volatile

Front

Main Memory is volatile- RAM Temporary memory Secondary storage is non-volatile- Hard Disk Permanent memory

Back

Object Properties

Front

Type Identity (ID) Value

Back

IDE

Front

Integrated Development Environment Python Editor IDLE To create programs and modify programs PyCharm

Back

Boolean Expression

Front

True or False == != >= <=

Back

Import Module

Front

Import python files using Import filename To call an object from an imported file Filename.variable deck.remove()

Back

Algorithm

Front

A sequence of instruction that solves a problem

Back

Floored Division

Front

// Removed remainder/ decimals Leaves the whole number rounded down 20 // 10 = 2

Back

Boolean And/ Or/ Not

Front

And True when both operands are True Or True when at least one operand is True Not True when the single operand is False

Back

Digitized

Front

Broken down into pieces and represented as numbers

Back

Valid vs Invalid equations

Front

Valid x = 1 Invalid X + y = y + x

Back


Front

New line character

Back