CS 105 Final Python , HTML, CSS

0.0(0)
studied byStudied by 22 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/67

flashcard set

Earn XP

Description and Tags

Intro to computing

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

68 Terms

1
New cards

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

2
New cards

What does REPL stand for?

Read-Evaluate-Print-Loop

3
New cards

What is Python?

A programming Language

4
New cards

What version of Python do we use?

Python 3 because Python 2 is in legacy code

5
New cards

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)

6
New cards

How do we express letters in Python?

We use string data “String“

7
New cards

What are some math shortcuts for Python?

+= addition

-= subtraction

//= Division

*= Multiplication

8
New cards

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

9
New cards

what always results in a floating point value?

/ always results in a floating Point Value

10
New cards

What always results in integer division?

// results in integer division

11
New cards

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

12
New cards

what is the syntax for the primer of a while loop that initializes the loop control variable?

Counter = 0

13
New cards

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

14
New cards

Why is the javascript always at the bottom of the HTML code?

This is because it will not work if it’ at the top

15
New cards

How to convert string and float data?

float is ()

string is double/single quotes

When you convert it, it is know as casting

16
New cards

How would you cast float data (3.6)?

(4.0)

(3.0)

(3.5)

(3.0) because Python is a floor operation

17
New cards

What do variables do in Python?

They store Objects using =

Variable = Object name

(They aren’t equal)

18
New cards

How do you create arrays with Python?

[]

19
New cards

How do you reassign a variable?

You appoint it to a new object

20
New cards

What do functions start with in Python?

def (function name)

21
New cards

How do we get random numbers in Python?

import random

randomNumber = random.randint(1,100)

22
New cards

What is the command for the turtle to go forward?

turtle.forward

23
New cards

What is the command for the turtle to go left?

turtle.left

24
New cards

What is the command for the turtle to go right?

turtle.right

25
New cards

What is the command for the turtle to start drawing?

turtle.pendown

26
New cards

What is the command for the turtle to stop drawing but keep moving?

turtle.penup

27
New cards

What the command for the turtle to go to an area?

turtle.goto

28
New cards

What is the test syntax of a while loop?

while counter > (int or variable)

29
New cards

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

30
New cards

What is the changer of a while loop that ends the loop?

counter += 1

31
New cards

What is the print function for Python?

print(“string data”, variable)

32
New cards

What does HTML stand for?

Hyper Text Markup Language

33
New cards

What is first line boilerplate of Html?

<!DOCTYPE html>

34
New cards

What is the second line of boilerplate html?

<html>

35
New cards

What is the first part of the head of boilerplate html in replit?

<head>

36
New cards

What is the second part of the head boilerplate in Html for replit?

<meta charset=”utf-8”>

37
New cards

What is the third part of the head boilerplate in html for replit?

<meta name=”viewport” content=”width=device-width”>

38
New cards

What is the fourth part of the boilerplate html for replit?

<title>replit </title>

39
New cards

What is the fifth part of the head boilerplate for replit?

<link href=”style.css” rel=”stylesheet” type=”text/cs”/>

40
New cards

What is the end of the head boilerplate in html for replit?

</head>

41
New cards

what is the body boilerplate html ?

<body>

<script src=”script.js”></script>

</body>

</html>

42
New cards

what is the <h1>-<h6> tag?

<h1>Those are heading tags that are used for the titles of webpages in html. </h1>

43
New cards

What is the paragraph tag?

<p> Paragraph tags used to make paragraphs in webpages </p>

44
New cards

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

45
New cards

What is the list item tag?

<li> list item tag

</li> - end tag for list item

Used in conjunction with <ul> and <ol>

46
New cards

What is the center tag? Is it inline or external?

<center> centered tag, it centers text

</center> - end tag for center

-For inline CSS

47
New cards

What is the bolded tag?

<b> bolded

</b> - end tag bold

48
New cards

what is the horizontal line tag?

<hr>

49
New cards

What is the table tag?

<table> </table>

50
New cards

What are the tags used to make tale rows and columns ?

<tr> </tr> for table row

<td> </td> for columns

51
New cards

What is the order of execution for inline, internal and external?

External, Internal, Inline

52
New cards

How do you change the font weight with external CSS?

.classname{

font-weight: 100%;

53
New cards

How do you change the background color in a webpage with external CSS?

#Id name{

background-color: color;

}

54
New cards

How do we specify the width and length of a class or Id?

.classname or #Idname{

width: 100%;

height: 100%;

}

55
New cards

How do you change the color of a font with external CSS?

.classname{

font-color: color ;

}

56
New cards

How do you add/change the border of a text box with external CSS

#Idname{

border-style: dotted;

}

57
New cards

Where do arrays start with Javascript?

start at an index of 0

58
New cards

How do we start functions in Javascript?

function function name

59
New cards

How do we start functions with Python?

def function name

60
New cards

How does Console.log work?

Console.log prints messages to the console ex-

console.log(“Hello World”)

61
New cards

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”>

62
New cards

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

63
New cards

What does the alert function( a javascript function) do ?

A pop up message

64
New cards

How do you get a random number from javascript?

import java.util

65
New cards

What is the highest rbg value?

255

#ffff

66
New cards

How do you set rbg values for html?

border color: (0, 0, 0)

R is first

B is second

G is third

67
New cards

What is the file name for selecting python

.py

68
New cards

How does the turtle create shapes?

360/number of sides