Looks like no one added any tags here yet for you.
Bits and Binary
All data that is stored in a computer is converted to sequences of 0s and 1s.
Unicode
A character code that enables most of the languages of the world to be symbolized with a special character identification.
Hardware
The physical devices that a computer is made of .The programs that run on a computer are referred to as software.
Operating system
the software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals.
IDE
a single program that gives you all of the tools you need to write, execute, and test a program.
IDLE
Provides a basic environment for editing and running programs.
Assembler
A(n) ____ reads assembly language code and converts it into machine language.
Compiler
A program that translates code in a high-level language (such as Java) to machine instructions (such as bytecode for the Java virtual machine).
Algorithm
A sequence of instructions that solves a problem
Input
variable =input('prompt')
Prompt
name= input ("what is your name? ") Zoey print ("My name is" ,name, ) or print (name) My name is Zoey or Zoey
int (item)
used when you are prompting the user to input whole numbers only
float (item)
used when the user is prompted to input numbers containing decimal (non-whole numbers)
Python is case-sensitive.
YES!! The upper-case and lower-case of a letter are distinct
python keywords
Protected, special words (tells Python you are about to define a function)
identifier
A candidate key that has been selected as the unique, identifying characteristic for an entity type.
invalid identifiers
using names stored in the python Libra
starting with a number
using special characters like % or $ or @ or .
Notes on identifiers
sequence of letters (a-z, AZ), underscores (_), and digits (0-9), and must start with a letter or an underscore
Variable Statement
a name that represents a value stored in the computer's memory.
argument
The item passed to a function
comments before actually writing the code helps organize
addition operator
subtraction operator
multiplication operator
/
division operator
//
integer divsion- divides one number by the other and gives the answer as an integer
%
remainder operator divides one number by the other and gives the remainder
+=
x += 5; x = x + 5
-=
y-=2, y=y-2
*=
y*=3 y=3*y
/=
a/=b a=a/b
%=
c%=3 c=c%3
string (str)
ordered sequence ('hello' 'Sammy' '2000')
lists (list)
Ordered sequence of objects: [10,"hello",200.3]
Dictionaries (dict)
Unordered Key:Value pairs: {"mykey" : "value" , "name" : "Frankie"}
Tuples (tup)
Ordered immutable sequence of objects: (10,"hello",200.3)
Sets (set)
Unordered collection of unique objects: {"a","b"}
Booleans (bool)
Logical value indicating True or False
( )
items in here are evaluated first think PEMDAS
unary
negative
**
exponent ( if you want 3^6 you put in python 3**6)
Types of Errors
Syntax, Logic, Runtime
how do you do a math function in python?
import math print the variable name to get the result of the math function performed .
math.sqrt
Returns the square root of a number
math.floor
Rounds a number down to the nearest integer
math.ceil
Rounds a number up to the nearest integer
math.fabs
Returns the absolute value of a number
math.pow
computes the exponent
math.factorial(x)
Returns the factorial of x
math.fmod(x,y)
returns the reminder
math.isnan(x)
Return True if x is a NaN (not a number), and False otherwise.
Which creates a string variable first_name with a value 'Daniel'? a. Daniel = first_name b. first_name = 'Daniel' c. first_name = Daniel
b. first_name = 'Daniel'
len function
returns the length of a sequence such as a list
greater than
<
less than
=
greater than or equal to
<=
less than or equal to
==
equal to
!=
not equal to
when using the operators what does python read it as
a question for example x>=y is x greater than or equal to y?
if statement
t is used to create a decision structure, which allows a program to have more than one path of execution. The statement causes one or more statements to execute only when a Boolean expression is true.
Boolean Expression
in programming, an expression that evaluates to True or False.
what is needed for an if statement to run properly
an indention.
assignment (floor=13)
makes something true
equality (if floor== 13)
checks if something is true
AND operator
Connects two Boolean expressions into one compound expression, BOTH subexpressions must be true for the expression to be true
OR operator
Connects two Boolean expressions into one compound expression one or both subexpressions must be true for the expression to be true it doesn't matter which
NOT operator
one of the logical operators; reverses the truth-value of a condition
true and true
true
true and false
false
false and true
false
false and false
false
true or false
true
true or true
true
false or true
true
false or false
false
if-else statement
Allows your program to perform one action if the expression evaluates to true and a different action if the expression evaluates to false.
elif
stands for else if. if the first test evaluates to False, continues with the next one
else statement
if if statement isn't true (doesn't run) this will