Nav Bar
  • Home
  • Essays
  • Habits
  • Contact
  • Sign Up
  • Flashcard
  • Kid Stuff
  • About
  • Good Stuff
Connected successfully
Index Subject Front Back Difficulty
10 coding What is HTML? HTML stands for Hyper Text Markup Language and is the primary tool webpages use to communicate with web browsers about the structure and content of webpages Hard
11 reading how can I read better? stop and think while you are reading... Hard
22 js what does map() do? Map iterates thru an array like this: const arrayold =[1,2,3]; const arraynew = arrayold.map(item => item + 1.2);" Hard
23 js what does filter() do? const arrayold =[1,2,3,4]; const greaterthan2 = arrayold.filter(thingy => {return thingy > 2); Hard
24 ht how to insert an image in html? < img src="https://the path to pick.png"> Hard
25 ht attribute that makes new tab open when you click on link ? target="_blank" Hard
26 ht how to disable a input disabled="disabled" or just disabled Hard
27 ht how to get hover over note in link title="whatever you want the note to say" Hard
28 ht how to include doc type <!DOCTYPE html> Hard
29 ht how to reference < and > (amperstand)lt; (amperstand)gt; Hard
30 html how to get js into html? put it in the head also use a script src="javascript.js" defer defer makes it Hard
31 html Italic, bold, underline… <i> same for b and u Hard
32 html how to put an image as a link use an a href but sub out the normally underlined text area with a picture using img src="" Hard
33 html how to link to a specific area of a page take as an h2 tag give it an id="thisspot" then tack it on the back of the href like this index.html#thisspot Hard
34 prog what is recursion? A function is recursive if it calls itself. Hard
35 prog command run in the terminal BASH commands Hard
36 prog difference between stack and q stack add top take top q take top add to back Hard
37 prog yield return pauses the function until you step back into it later...usually yield returns something else Hard
38 html what do you use to tag generic code <code> but it only puts it in monospace type Hard
39 html how to retain whitespace? use the < pre > tag Hard
40 html what is the way to tag dates in html? &alt time datetime="2014-12-15">15th December 2015</time> Hard
41 html list the main tags in a webpage head header nav main body footer bonus stuff aside, section, div, span Hard
42 html how to keep hacker at bay when embedding content use sandbox attribute Hard
43 CSS how do you ref css sheet external to html page use a link tag Hard
44 CSS how to you use css inside of html? use a style element (tag) Hard
45 CSS tool for putting thing where they need to be flexbox Hard
46 JS put a script into html header either script tag or <script> src-"the/path.js" </script> Hard
47 js reserved words abstract arguments await* boolean break byte case catch Hard
48 test asdf asasdff asasdff asasdff asasdff Hard
49 test adf asdf asdf asdf asdf asdf asdf Hard
50 test asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf Hard
51 js embed a variable use backticks alert(`hello, ${variable}`); Hard
52 js null means nothing or empty or unknown Hard
53 js typeof operator return the type of thing typeof 0 // "number" typeof "foo" // "string" Hard
54 js use a unary + to basically do the same as Number(...) let apples = "2"; let oranges = "3"; alert( +apples + +oranges ); // 5 Hard
55 js apply an operator to a variable and store the new result in that same variable. let n = 2; n += 5; // now n = 7 (same as n = n + 5) n *= 2; // now n = 14 (same as n = n * 2) Hard
56 js increment by one let counter = 2; counter++; // works the same as counter = counter + 1, but is shorter Hard
57 js prefix form ++counter increments counter and returns the new value what does the postfix form do? counter++ the postfix form returns the old value (prior to increment/decrement). Hard
58 js test for equality double equality sign == Hard
59 JS how to check equality without type conversion === Hard
60 js write an if statement for does year = 2022 if (year==2022) { alert ("you got it!"); } Hard
61 JS let vs var let will throw an error if you try to declare it twice Hard
62 JS in a string how to escape a character? use a backslash Hard
63 JS newline Hard
64 js property that counts the characters in a string or slots in array .length Hard
65 js get the first letter of const firstName = "Charles"; firstName[0]; Hard
66 js example of nested array const teams = [["Bulls", 23], ["White Sox", 45]]; Hard
67 js get something into the backend of an array .push(); Hard
68 js take one from the backend of an array .pop() Hard
69 js how to pull items off the front of an array arrayName.shift(); Hard
70 js put thing into an array a 1st position arrayName.unshift(itemToAdd); Hard
71 js define a func with two arguments function functionWithArgs(arg1, arg2) { console.log(arg1,arg2); } Hard
72 js how to get something back from a function use return like function plusThree(num) { return num + 3; } Hard
73 js Variables which are defined outside of a function block have _____ scope. Global Hard
74 js another way to have a variable be global inside a function leave off the let, var , const keyword.... Hard
75 js which variable takes precedence global or local? local Hard
76 js once a function hits this keyword it evaluates it and stops return Hard
77 js what is the equality operator == Hard
78 js strict equality operator === example 3 === "3" //false Hard
79 js when comparing with != or == what does true and false resolve to 1 and 0 Hard
80 js example of if statement using else if if (num > 2) { return "number is greater than 2"; } else if (num >0) { return "number is greater than 0"; } else { return "number is less than or equal to 0"; } Hard
81 js switch statement example switch (val) { case 1: answer = "alpha"; break; case 2: answer = "beta"; break; case 3: answer = "gamma"; break; case 4: answer = "delta"; } Hard
82 js Objects are similar to arrays, except that instead of using indexes to access and modify their data, you access the data in objects through what are called ______. properties Hard
83 js simple cat object const cat = { "name": "Whiskers", "legs": 4, "tails": 1, "enemies": ["Water", "Dogs"] }; Hard
84 js If the property of the object you are trying to access has a space in its name, you will need to use _______ bracket notation. Hard
85 js check to see if object has a property object.hasOwnProperty(propname); Hard
86 js complex data structure example const ourMusic = [ { "artist": "Daft Punk", "formats": [ "CD", "Cassette", "LP" ], "gold": true } ]; Hard
87 js Fluffy? const ourPets = [ { animalType: "cat", names: ["Meowzer","Fluffy","Kit-Cat" ] } ] ourPets[0].names[1] would be the string Fluffy (remember the eyeball) Hard
88 js if accessing an object with a variable you need to use [] box notation not dot Hard
89 js update artist name (var prop) with "{Prince" (var value) in records object (var id contains prop) records[id][prop] = value; Hard
90 js update track value and create array (track var prop) with "1999" (var value) in records object (var id contains prop) records[id][prop] = [value]; Hard
91 js append track value array (track var prop) with "1999" (var value) in records object (var id contains prop) records[id][prop].push(value); Hard
92 js If value is an empty string, delete the given prop property from the album. else if (value ==="") { delete records[id][prop]; Hard
93 js while loop example add six number to myArray = [] let i = 5; while (i>-1) { myArray.push(i); i--; } Hard
94 js for loop sections for (initialize;while;increment) { do this; } Hard
95 js count backward from 10 using a for loop pushing results into myArray for (let i=10;i>0;i=i-1) { myArray.push(i); } Hard
96 js use a for loop to sum an array let total = 0; for (let i = myArr.length-1; i>-1; i=i-1) { total = total + myArr[i]; } Hard
97 js iterate thru an array with a nested array product of all the nums let product = 1; for (let i = 0; i Hard
98 js in a do while loop the code will run at least once Hard
99 js construct a do while loop that puts a count of 4 into const ourArray = []; let i = 1; do { ourArray.push(i); i++; } while (i < 5); Hard
100 js make a function using recursion summing n elements of an array begin like this function sum(arr, n) { if (n<=0){// this n is going to be offset before lookin up in array return 0; } else { return sum(arr,n-1) + arr[n-1]; //1st n-1 is simply the second pass thru..next is position in arr. } Hard
101 js check if a prop is in const contacts = [ { firstName: "Akira", lastName: "Laine", number: "0543236543", likes: ["Pizza", "Coding", "Brownie Points"], } if (prop in contacts[x]) Hard
102 js return the prop value in object const contacts = [ { firstName: "Akira", lastName: "Laine", number: "0543236543", likes: ["Pizza", "Coding", "Brownie Points"], } return contacts[i][prop]; Hard
103 js check and see if var name is equal to any of the groups firstname in object const contacts = [ { firstName: "Akira", lastName: "Laine", number: "0543236543", likes: ["Pizza", "Coding", "Brownie Points"], } for (let i = 0; i < contacts.length ; i++) { if (contacts[i].firstName === name) { Hard
104 js use math to generate a random number between 0 and 10 Math.floor(Math.random() * (11) + 0) Hard
105 js why no ;? function randomRange(myMin, myMax) { let x =0; x= Math.floor(Math.random() * (myMax - myMin + 1) + myMin) // note the no ";" return x ; } Hard
106 js transform string to number parseInt(str); Hard
107 js write out the Conditional (Ternary) Operator for if a > b a is greater otherwise b is greater or equal a>b? "a is greater" : "b is greater or equal"; Hard
108 js use shorthand for if then chekc if num is pos neg or zero function checkSign(num) { return num>0? "positive" : num<0 ? "negative" :"zero" } Hard
109 js use recursion to make an array that counts down from n numbers function countdown(n){ if (n<1){ return []; } else { const countArray = countdown(n-1); countArray.unshift(n); return countArray; } Hard
110 js you need to review this //"https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers" Hard
111 js When you declare a variable with the var keyword, it is declared _______, or _______if declared inside a function. globally, locally Hard
112 py something wrong with the way your program is written — punctuation that does not belong, a command where it is not expected, or a missing parenthesis can all trigger a syntax error Hard
113 py occurs when the Python interpreter sees a word it does not recognize. NameError Hard
114 py If a multi-line string (using begin and end with """) isn’t assigned a variable or used in an expression it is treated as a comment. Hard
115 py if then using 2 = 4-2 as conditional print apple if 2 == 4 - 2: print("apple") Hard
116 py sample boolean expression using >= and use and statement_one = (2 + 2 + 2 >= 6) and (-1 * -1 < 0) # the key here is to remember that all of the equations on the right resolve to either True or False Hard
117 py write structure of else if if planet == 1: weight = weight * 0.91 elif planet == 2: weight = weight * 0.38 else: weight = 1 Hard
118 py Error caused by not following the proper structure (syntax) of the language. SyntaxError Hard
119 py Errors reported when the interpreter detects a variable that is unknown. NameError Hard
120 py Errors thrown when an operation is applied to an object of an inappropriate type. TYPEERROR Hard
121 py add to end of list .append() Hard
122 py remove from end of list example_list = [1, 2, 3, 4] .remove(4) Hard
123 py remove False from ben customer_data = [["Ainsley", "Small" ,True] ,["Ben", "Large", False] ,["Chani", "Medium", True], ["Depak", "Medium", False]] customer_data[1].remove(False) Hard
124 py a list method to count th nuymber of occur of element .count() Hard
125 py a list method to insert into a specific index .insert(index#, element) Hard
126 py remove specific index value from list list.pop(index#) Hard
127 py range function starts at __ unless given two numbers and creates range but will need to be converted to a list using the ___ func remember that 2,10 starts with 2 but ends with __ 0 list() 9 Hard
128 py slice this getting b and c letters = ["a", "b", "c", "d", "e", "f", "g"] letters[1:3] Hard
129 py For our fruits list, suppose we wanted to slice the first three elements. fruits[:3] Hard
130 py slicing syntax list[start:end] Hard
131 py count the number of times an element appears in a list .count(if str "element" if num #) Hard
132 py how to sort a list in reverse list.sort(reverse=True) Hard
133 py .sort _____ the list directly modifies Hard
134 py The .sort() method does not return any value If we do assign the result of the method, it would assign the value of None Hard
135 py sort a list using a func... it produces a ___ list new sorted(list) Hard
136 py check the num of elements in list len(list) Hard
137 py tuples data structure not changeable uses what sign my_tuple = ("mike", 43) Hard
138 py unpack a tuple my_tup =("mike", 24, "programmer") name, age, job = my_tup now if I say print (name) output would be mike Hard
139 py zip does what it smashes two lists together to create an object but it needs to be converted to a list by using list(object) Hard
140 py for temp in range(3): print("Loop is on iteration number " + str(temp + 1)) Loop is on iteration number 1 Loop is on iteration number 2 Loop is on iteration number 3 Hard
141 py length = len(ingredients) index = 0 use while loop to iterate thru ingrediants list while index < length: print(ingredients[index]) index += 1 Hard
142 py When the loop then encounters a continue statement it immediately ____ the current iteration and moves onto the next element skips Hard
143 py use a list comprehension instead of the formal for loop numbers = [2, -1, 79, 33, -45] doubled = [] for num in numbers: doubled.append(num * 2) doubled = [num * 2 for num in numbers] [how to change the list...for loop] Hard
144 py list comprehensions if if else [height for height in heights if height>161] [height if height>161 else height *3 for height in heights] Hard
145 py using a list comprehension to pull only prices < 30 out of list and grab hairstyle type from other list cuts_under_30 = [hairstyles[i] for i in range(len(new_prices)-1) if prices[i] < 30] Hard
146 py keyword indicates the beginning of a function def Hard
147 py In Python, there are 3 different types of arguments we can give a function. __ arguments: arguments that can be called by their position in the function definition. ___ arguments: can be called by their name. ___arguments: given default values. Positional Keyword Default Hard
148 py keyword arguements calculate_taxi_price(rate=0.5, discount=10, miles_to_travel=100) Hard
149 py default argument look at discount parameter def calculate_taxi_price(miles_to_travel, rate, discount = 10): print(miles_to_travel * rate - discount ) Hard
150 py help("string") MODULE REFERENCE https://docs.python.org/3.8/library/string Hard
151 py read this list of builtin funcs https://docs.python.org/3/library/functions.html Hard
152 py if return three variables assign them to new vars and = the func call ost_popular1, most_popular2, most_popular3 = top_tourist_locations_italy() Hard
153 test testing for shawn asdf Hard
154 py replace function a_string = "Welcome to Educative!" new_string = a_string.replace("Welcome to", "Greetings from") Hard
155 py format() method can be used to format the specified value(s) and insert them in string’s placeholder(s). string1 = "Learn Python {version} at {cname}".format(version = 3, cname = "Educative") Hard
156 py map(function, list) num_list = [0, 1, 2, 3, 4, 5] double_list = map(lambda n: n * 2, num_list) print(list(double_list)) #you have to call list func to turn it back to list Hard
157 py filter numList = [30, 2, -15, 17, 9, 100] greater_than_10 = list(filter(lambda n: n > 10, numList)) print(greater_than_10) Hard
158 py part_A = [1, 2, 3, 4, 5] part_B = [6, 7, 8, 9, 10] use func to merge the two part_A.extend(part_B) Hard
159 py common list methods aList.insert(index, newElement) a_list.append(newElement) Hard
160 py houses = ["Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"] remove the last house last_house = houses.pop() Hard
161 test this is my second test testing more Hard
162 py houses = ["Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"] test Hard
163 py houses.remove("Ravenclaw") test Hard
164 py cities = ["London", "Paris", "Los Angeles", "Beirut"] get the index of LA print(cities.index("Los Angeles")) # It is at the 2nd index Hard
165 py cities = ["London", "Paris", "Los Angeles", "Beirut"] check if London is in cities list print("London" in cities) # evals to True Hard
166 py nums = [10, 20, 30, 40, 50] nums_double = [] double numbers in nums and jam it into nums_d list for n in nums: nums_double.append(n * 2) Hard
167 py nums = [10, 20, 30, 40, 50] use comprehension double numbers in nums and jam it into nums_d list nums_double = [n * 2 for n in nums] Hard
168 py nums = [10, 20, 30, 40, 50] # List comprehension with comdition if n > 20 nums_double = [n * 2 for n in nums if n > 20] Hard
169 py two ways to create a dict note that dict are unordered phone_book = dict([(bob, 3151), (henrgy, 5152)]) phone = dict(bob=3151, hengry=5152) Hard
170 py get cerseti value phone_book = {"Batman": 468426, "Cersei": 237734, "Ghostbusters": 44678} print(phone_book["Cersei"]) Hard
171 py add entry or change a dict value phone_book = {"Batman": 468426, "Cersei": 237734, "Ghostbusters": 44678} phone_book["Godzilla"] = 46394 # New entry phone_book["Godzilla"] = 9000 # Updating entry Hard
172 py delet key:value pair in dict del phone_book["Batman"] Hard
173 py to copy the contents of one dictionary to another, we can use the update() operation: phone_book1.update(phone_book2) Hard
174 py union is the whole group of both sets setA.union(set_B) Hard
175 py intersection of two sets set_A = {1, 2, 3, 4} set_B = {2, 8, 4, 16} print(set_A & set_B) print(set_A.intersection(set_B)) print(set_B.intersection(set_A)) Hard
176 py find the diff (what is only in A) set_A = {1, 2, 3, 4} set_B = {2, 8, 4, 16} print(set_A - set_B) print(set_A.difference(set_B)) Hard
177 py class Employee: def __init__(self, ID, salary): self.ID = ID self.__salary = salary # salary is a private property note the double underscore __ Steve = Employee(3789, 2500) print("ID:", Steve.ID) print("Salary:", Steve.__salary) # this will cause an error Hard
178 py @staticmethod versus @classmethod @classmethod def getTeamName(cls): #note the cls is like self return cls.teamName Hard
179 py testing testing Hard
180 py private prop __userName and __password are declared privately using the __ prefix. Hard
181 py to encapsulate use setters and getter functions (more secure) Hard
182 py Inheritance provides a way to create a new class from an existing class. The new class is a specialized version of the existing class such that it inherits all the non-private fields (variables) and methods of the existing class. Hard
183 py class ParentClass: how to inherit all non-private prop/meth class ChildClass(ParentClass): # attributes of the child class Hard
184 py how to use super() class Car(Vehicle): def __init__(self, make, color, model, doors): super().__init__(make, color, model) self.doors = doors Hard
185 py inheritance from multiple parent classes # inherited from CombustionEngine and ElectricEngine class HybridEngine(CombustionEngine, ElectricEngine): def printDetails(self): print("Tank Capacity:", self.tankCapacity) print("Charge Capacity:", self.chargeCapacity) Hard
186 py polymorphism refers to the same object exhibiting different forms and behaviors. method overriding (calculate area of circle or square by overwritting the method) operator overloading (change the way + works for example) .... Hard
187 py class Dog: # polymorphism without inheritance def Speak(self): print("Woof woof") class Cat: def Speak(self): print("Meow meow") class AnimalSound: def Sound(self, animal): animal.Speak() sound = AnimalSound() dog = Dog() cat = Cat() sound.Sound(dog) sound.Sound(cat) Hard
188 test this is a question here is answer Hard
189 py if you want to let print statements build up on a single line print("blah", end="") Hard
190 py six stages of programming problem analysis - study it specs - what it will do design - pseudocode implementation - code it test maintenance Hard
191 py interger division remainder // % Hard
192 py objects what can they do hold data do stuff interact by sending messages aka request to do something Hard
193 py split date = 11/22/83 month, day, year = date.split("/") Hard
194 py format a string "this {} a string{}".format("is","!") Hard
195 py more format stuff set width precision left right center {0:<5.20} variable to fill, left justify, W ,P Hard
196 py file.read() returns sinlge multi line string Hard
197 py file.readline() returns only next line of file inclunding n/ Hard
198 py file.readlines() returns a list Hard
199 py local variables do not retain any values from one function to the next Hard
200 py python passes all variables by value Hard
201 py how to code pretend someelse is going to build all your func classes def main() print intro roll to go first Hard
202 py the general process of determining the imporatnt chara of something and ignoring the other is called abstraction... this is a fundamental tool of design... top down level design is a process of finding useful abstractions Hard
203 py types of design top down spiral/prototype-iterate OOD Hard
204 py range(1,9) does it include 9? No Hard
205 py how to get keys into a list from a dictionary #race_list = list(race_dict.keys()) Hard
206 py what is the object constructor def __init__ (self): {can also have additional arg} Hard
207 py the value in instance variables is that they can be ____ refer to by other methods or even outside of the class Hard
208 py why in a class would you not use the self self.variable if you are not going to need the variable elsewhere so it is okay for the variable to vanish once the function done executing Hard
209 py seperation of concerns encapsulation Hard
210 py outside the class all interaction should be done with its methods... this makes sense because that would be the only thing that would change...aka it keeps code clean and easier to debug Hard
211 py comments place in first line of program or module or func it is called __doc__ attribute and is accessible dynamically. Hard
212 py once a module is loaded to actually reload it you must reload() Hard
213 py private method begin with single or double underscore _ or __ Hard
214 py list methods append, sort, reverse, shuffle, index(x) return the index of x, insert, count(x), remove, pop Hard
215 py dictionary method dict.___ keys, values, 4 both use items .get(,default) del dict[key] dict.clear deletes all Hard
216 py read page 420 in zelle book on how to do OOD ... Hard
217 py polymorphism example two classes with the same method names (circle and rectangel) method is calculate area... Hard
218 ocean why does the ocean have waves because of the wind Hard
-------------------