1/67
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
An algorithm is
-A recipe for a solution to a specific problems.
- A series of instructions that will always lead to a correct solution
-does not have to be the desired solution
What does REPL stand for?
Read-Evaluate-Print-Loop
What is Python?
A programming Language
What version of Python do we use?
Python 3 because Python 2 is in legacy code
What are the Two Primary types number?
The two primary number types are integers (1,2,3,4)
And float data- fractional (1.5, 2.5)
How do we express letters in Python?
We use string data “String“
What are some math shortcuts for Python?
+= addition
-= subtraction
//= Division
*= Multiplication
What are the uncommon mathematical shortcuts?
5**5 mean 5 to the power of 5 (5 × 5 × 5 × 5 × 5)
10 % 3 means to divide 10 by 3 and output the remainder instead of the integer
what always results in a floating point value?
/ always results in a floating Point Value
What always results in integer division?
// results in integer division
What does a while loop test?
The loop tests true or false, if true then the result stays in the loop, if false then the loop ends
what is the syntax for the primer of a while loop that initializes the loop control variable?
Counter = 0
What is the syntax of the function and test of the while loop?
While counter < 3
Print(“hello”)
The bolded represents the function The underline is the test
The highlighted is the result if the test comes out true
Why is the javascript always at the bottom of the HTML code?
This is because it will not work if it’ at the top
How to convert string and float data?
float is ()
string is double/single quotes
When you convert it, it is know as casting
How would you cast float data (3.6)?
(4.0)
(3.0)
(3.5)
(3.0) because Python is a floor operation
What do variables do in Python?
They store Objects using =
Variable = Object name
(They aren’t equal)
How do you create arrays with Python?
[]
How do you reassign a variable?
You appoint it to a new object
What do functions start with in Python?
def (function name)
How do we get random numbers in Python?
import random
randomNumber = random.randint(1,100)
What is the command for the turtle to go forward?
turtle.forward
What is the command for the turtle to go left?
turtle.left
What is the command for the turtle to go right?
turtle.right
What is the command for the turtle to start drawing?
turtle.pendown
What is the command for the turtle to stop drawing but keep moving?
turtle.penup
What the command for the turtle to go to an area?
turtle.goto
What is the test syntax of a while loop?
while counter > (int or variable)
what do else and elif do in a while loop?
Else is if the output returns false, elif is an alternative value if the else value is false
What is the changer of a while loop that ends the loop?
counter += 1
What is the print function for Python?
print(“string data”, variable)
What does HTML stand for?
Hyper Text Markup Language
What is first line boilerplate of Html?
<!DOCTYPE html>
What is the second line of boilerplate html?
<html>
What is the first part of the head of boilerplate html in replit?
<head>
What is the second part of the head boilerplate in Html for replit?
<meta charset=”utf-8”>
What is the third part of the head boilerplate in html for replit?
<meta name=”viewport” content=”width=device-width”>
What is the fourth part of the boilerplate html for replit?
<title>replit </title>
What is the fifth part of the head boilerplate for replit?
<link href=”style.css” rel=”stylesheet” type=”text/cs”/>
What is the end of the head boilerplate in html for replit?
</head>
what is the body boilerplate html ?
<body>
<script src=”script.js”></script>
</body>
</html>
what is the <h1>-<h6> tag?
<h1>Those are heading tags that are used for the titles of webpages in html. </h1>
What is the paragraph tag?
<p> Paragraph tags used to make paragraphs in webpages </p>
What is the unordered and ordered list tags?
<ul> unordered list
<ol>ordered list
</ul> - end tag for unordered list
</ol> - end tag for ordered list
What is the list item tag?
<li> list item tag
</li> - end tag for list item
Used in conjunction with <ul> and <ol>
What is the center tag? Is it inline or external?
<center> centered tag, it centers text
</center> - end tag for center
-For inline CSS
What is the bolded tag?
<b> bolded
</b> - end tag bold
what is the horizontal line tag?
<hr>
What is the table tag?
<table> </table>
What are the tags used to make tale rows and columns ?
<tr> </tr> for table row
<td> </td> for columns
What is the order of execution for inline, internal and external?
External, Internal, Inline
How do you change the font weight with external CSS?
.classname{
font-weight: 100%;
How do you change the background color in a webpage with external CSS?
#Id name{
background-color: color;
}
How do we specify the width and length of a class or Id?
.classname or #Idname{
width: 100%;
height: 100%;
}
How do you change the color of a font with external CSS?
.classname{
font-color: color ;
}
How do you add/change the border of a text box with external CSS
#Idname{
border-style: dotted;
}
Where do arrays start with Javascript?
start at an index of 0
How do we start functions in Javascript?
function function name
How do we start functions with Python?
def function name
How does Console.log work?
Console.log prints messages to the console ex-
console.log(“Hello World”)
How do you add a favicon to your website?
Create image —> upload to your website
add the favicon file
syntax
<link rel=”icon” href=”favicon.ico?v=2”>
Where is the favicon stored until you use it?
Cash- fast memory, you have to take it out in order to used the favicon
you do that with ?v=2
What does the alert function( a javascript function) do ?
A pop up message
How do you get a random number from javascript?
import java.util
What is the highest rbg value?
255
#ffff
How do you set rbg values for html?
border color: (0, 0, 0)
R is first
B is second
G is third
What is the file name for selecting python
.py
How does the turtle create shapes?
360/number of sides