Vocab
This is a blog post about Units 2 and 3 Vocab
Unit 2 Vocab
- Bits - Smallest unit of data that a computer can process and store
- Bytes - A unit of data that is eight binary digits long
- Hexadecimal - A numbering system with base 16
- Binary Numbers - A numbering scheme in which there are only two possible values for each digit -- 0 or 1 :
- Unsigned Integer - Just like integers (whole numbers) but have the property that they don't have a + or - sign associated with them
- Signed Integer - Represent both positive and negative numbers
- Floating Point - A positive or negative whole number with a decimal point
- Binary Data Abstractions - Reduction of a particular body of data to a simplified representation of the whole:
- Boolean - A logical data type that can have only the values true or false
- ASCII - The most common character encoding format for text data in computers and on the internet
- Unicode - Universal character representation standard for text in computer processing
- RGB - A system for representing the colors to be used on a computer display
- Data Compression - the process of encoding, restructuring or otherwise modifying data in order to reduce its size:
- Lossy - the data in a file is removed and not restored to its original form after decompression
- Lossless - restores and rebuilds file data in its original form after the file is decompressed
isRaining = False
num1 = 20
num2 = -2
num3 = 5.4
letter = "D"
c = ord(letter)
print(isRaining)
print(num1)
print(num2)
print(num3)
print(c)
def Binary(x):
if x > 1:
Binary(x//2)
print(x%2, end = "")
def Hexadecimal(y):
return hex(y)
Binary(num1)
Hexadecimal(num1)
Unit 3 Vocab
- Variable - A value that can change, depending on conditions or on information passed to the program
- Data types - A classification that specifies which type of value a variable has and what type of mathematical, relational or logical operations can be applied to it without causing an error
- Assignment Operation - The operator used to assign a new value to a variable, property, event or indexer element
- Managing Complexity with Variables - Establishes a level of complexity on which a person interacts with the system, suppressing the more complex details below the current level:
- Lists - abstract data type that represents a finite number of ordered values, where the same value may occur more than once
- 2D Lists - collection of data cells, all of the same type, which can be given a single name
- Dictionaries - an abstract data type that defines an unordered collection of data as a set of key-value pairs
- Class - template definition of the method s and variable s in a particular kind of object
- Algorithms - a procedure used for solving a problem or performing a computation
- Sequence - the order in which the statements are executed
- Selection - a programming construct where a section of code is run only if a condition is met
- Iteration - a process where the design of a product or application is improved by repeated review and testing
- Expressions - a combination of values and functions that are combined and interpreted by the compiler to create a new value
- Comparison Operators - used to compare the values within an expression, such as to check if the value held by a variable matches the value held by another variable
- Booleans Expressions and Selection - a logical statement that is either TRUE or FALSE and can be selected
- Booleans Expressions and Iteration - a logical statement that is either TRUE or FALSE where a process can be repeated
- Truth Tables - a way of summarising and checking the logic of a circuit
- Characters - a display unit of information equivalent to one alphabetic letter or symbol
- Strings - a sequence of characters, either as a literal constant or as some kind of variable
- Length - The length of a data type, can be number of characters or number of data
- Concatenation - the operation of joining two strings together
- Upper - Uppercase characters
- Lower - Lowercase characters
- Traversing Strings - accessing all the elements of the string one after the other by using the subscript
- Python If, Elif, Else conditionals - expressions that evaluate to either true or false
- Nested Selection Statements - used when more than one decision must be made before carrying out a task
- Python For, While loops with Range, with List - a sequence of instruction s that is continually repeated until a certain condition is reached
- Combining loops with conditionals to Break, Continue - Conditionals that occur while a specific process is being repeated - can be stopped or passed
- Procedural Abstraction - when we write code sections which are generalised by having variable parameters
- Python Def procedures - A procedure allows us to group a block of code under a name, known as a procedure name
- Parameters - a special kind of variable used in a function to refer to one of the pieces of data provided as input to the function
- Return Values - ends the execution of a function, and returns control to the calling function
list = ["milk","cookies","cake"]
list1 = [28, 46, 51, 78, 16]
list2 = []
list3 = []
list4 = []
word = "AP"
word1 = "CSP"
dict = {"Messi":"Soccer", "Lebron James":"Basketball", "Usain Bolt":"Track Sprinter", "Roger Federer":"Baseball"}
isCold = True
isRaining = False
print(word + word1)
print(len(list))
print(word1.lower())
for characters in word:
list4.append(characters)
for i in list:
list2.append(i)
for x in list1:
if x % 2 == 0:
list3.append(x)
else:
y = x - 1
print(y)
print(list4)
print(list2)
print(list3)
dict["Roger Federer"] = "Tennis"
dict["Tiger Woods"] = "Golf"
print(dict)
if isCold == True:
if isRaining == True:
print("You should stay home or wear warm clothes with an umbrella")
elif isRaining == False:
print("Remember to wear warm clothes")
else:
print("Go outside")
def Factorial(z):
c = 1
while z > 1:
c = c * z
z = z - 1
return c
Factorial(7)