Web Programming Reviewer

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/108

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:38 PM on 4/16/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

109 Terms

1
New cards

Python

  • Is a high-level programming language known for its simple and readable syntax.

  • It is widely used in different fields such as web development, data science, automation, and artificial intelligence.

  • It is popular among beginners is because it is easy to learn compared to many other programming languages.

2
New cards

Guido van Rossum

  • He is a Dutch programmer.

  • In 1989 while he was working at the Centrum Wiskunde & Informatica (CWI) in the Netherlands.

  • The first official version of Python (Python 0.9.0) was released in February 1991.

  • This early version already included important features such as functions, exception handling, and core data types like lists and dictionaries.

3
New cards

Monty Python’s Flying Circus

The name “Python” was inspired by the British comedy show ___ which Guido van Rossum enjoyed watching. The name was chosen because it was short, unique, and memorable.

4
New cards

Where is Python Used?

  • It is used in many areas of technology and software development.

  • It is commonly used in web development, where developers create websites and web applications using frameworks such as Flask and Django.

  • Python is also widely used in data science and artificial intelligence, where it helps analyze data and build machine learning models.

  • In addition, Python is used for automation, scripting tasks, software development, and system administration.

5
New cards

Companies that use Python

  • Google

  • Netflix

  • Instagram

  • Spotify

6
New cards

Why Python is Good for Beginners?

  • It is considered one of the best programming languages for beginners because its syntax is simple and easy to read.

  • Unlike many other languages, Python requires fewer lines of code to accomplish tasks.

  • This allows students to focus more on understanding programming logic and problem-solving, rather than worrying about complex syntax.

  • Because of these advantages, Python is widely used in universities and programming courses around the world.

7
New cards

top to bottom

Python scripts are read and executed line by line from ____

8
New cards

Visual Studio Code

The code editor (IDE) used in this course to write and edit Python programs.

9
New cards

.py

The standard file extension used when naming Python files.

10
New cards

Data Types

  • String (str)

  • Integer (int)

  • Float (float)

  • Boolean (bool)

11
New cards

String (str)

  • Text data enclosed in double quotation marks (" ")

  • Does not require explicit "str" declaration.

12
New cards

Integer (int)

Whole numbers without any decimal points.

13
New cards

Float (float)

Numbers containing decimals, represented as 64-bit values.

14
New cards

Boolean (bool)

A logical data type that can only be either True or False

15
New cards

Collection Data Types

  • List

  • Tuple

  • Set

16
New cards

List

An ordered, mutable collection that can store multiple values in a single variable.

17
New cards

Example of a List

fruits = ["apple", "orange", "orange"]

where print(fruits[0]) outputs "apple".

18
New cards

Tuple

An immutable collection where values cannot be changed once they are created; often used for coordinates.

19
New cards

Example of a Tuple

coordinates = (10, 20)

20
New cards

Set

An unordered collection of unique values that automatically removes duplicate items.

21
New cards

Example of a Set

numbers = {1, 2, 3, 4, 4, 5}.

22
New cards

print()

A built-in function used to display output to the console.

23
New cards

input()

A function that receives user input and always returns it as a string value.

24
New cards

Type Conversion

  • Also known as Type Casting

  • Converting one data type to another, such as using int() to convert a string input into a number.

25
New cards

Example of Type Conversion

# The variable is at the front, followed by the conversion type

age = int(input("Enter your age: "))

# Now you can perform math because 'age' is an integer

print(age + 1)

26
New cards

Arithmetic Operators

These are used to perform mathematical calculations.

27
New cards

Examples of Arithmetic Operators

  • Addition +

  • Subtraction -

  • Multiplication *

  • Division /

  • Modulus %

  • Exponent **

  • Floor Division //

28
New cards

Comparison Operators

These are used to compare two values and always return a Boolean (True or False).

29
New cards

Examples of Comparison Operators

  • Equal to (==)

  • Not equal to (!=)

  • Greater than (>)

  • Less than (<)

  • Greater than or equal to (>=)

  • Less than or equal to (<=)

30
New cards

Logical Operators

These are used to combine multiple conditions together.

31
New cards

Examples of Logical Operators

  • and

  • or

  • not

32
New cards

and

Returns True only if both conditions are True.

33
New cards

or

Returns True if at least one condition is True.

34
New cards

not

Reverses the result; turns True to False and False to True.

35
New cards

Data Structure

  • An organizational framework and methods for organizing data.

  • It provides specific methods for organizing, managing, and storing data to enable efficient access and modification.

36
New cards

Importance of Data Structures

  • Efficiency

  • Problem-Solving

  • Regional Demand (e.g. Engypt, Saudi Arabia, MENA)

37
New cards

Abstract Data Types (ADTs)

  • Define allowed operations without focusing on the underlying implementation.

  • A logical description of a data set and the operations allowed on it without specifying how the data is actually stored in memory.

38
New cards

Big-O Notations

  • Big O

  • O (log n)

  • O (1)

  • O (n)

39
New cards

Big O Notation

A mathematical notation used in computer science to measure and describe the efficiency of an algorithm's execution time or space requirements as the input size grows.

40
New cards

O(log n)

Represents logarithmic time, commonly seen in binary search operations.

41
New cards

O(1)

Constant time complexity; the fastest performance regardless of data size.

42
New cards

O(n)

Linear time complexity; performance scales directly with a linear scan of the data.

43
New cards

Linear Data Structure

A structure where data elements are arranged sequentially, meaning each element is attached to its previous and next adjacent elements.

44
New cards

Types of Linear Data Structures

  • Arrays

  • Linked List

  • Stack

  • Queue

45
New cards

Arrays

Efficient storage using a contiguous memory layout for quick access.

46
New cards

Linked List

Efficient organization where elements are connected by pointers in a flexible memory structure.

47
New cards

Stack

  • A "Last-In, First-Out" structure (LIFO)

  • Uses push to add elements to the top and pop to remove the most recently added item.

48
New cards

Queue

  • A "First-In, First-Out" structure (FIFO)

  • Uses enqueue to add and dequeue to remove items.

49
New cards

Non-Linear Data Structure

Used for managing complex, hierarchical relationships within data.

50
New cards

Types of Non-Linear Data Structures

  • Trees

  • Graphs

51
New cards

Trees

  • A hierarchical structure that forms a relationship like that of the parent and a child.

  • It consists of various nodes linked together.

  • It includes types like Binary Trees and Binary Search Trees.

52
New cards

Graphs

A structure consisting of nodes (vertices) representing entities and edges representing the connections or relationships between those entities.

53
New cards

Hash Tables

A structure that maps keys to values for extremely fast data retrieval; it uses collision handling like chaining or open addressing to manage data conflicts.

54
New cards

MENA Core Studies

Localized applications of these data structures used to build infrastructure for Smart Cities, Healthcare systems, and Fintech (Financial Technology).

55
New cards

Common Learning Challenges

  • Pointers

  • Recursion

  • Debugging

  • Visual Learning

  • Hands-on Coding

  • Practice Platforms

56
New cards

Code Quality Standars

Industry best practices for writing maintainable software, such as using clear naming conventions, performing unit testing, and adhering to style guides.

57
New cards

Flask

A lightweight, flexible Python web framework designed for building applications quickly with minimal complexity by functioning as a web server that processes browser requests and returns HTML, data, or templates.

58
New cards

Armin Ronacher

The developer who released Flask in 2010, originally as an April Fool's joke, after deciding to create a simpler alternative to more complex Python frameworks.

59
New cards

Micro-framework

A design concept where the framework includes only basic tools for routing, request handling, and template rendering without enforcing a strict project structure or built-in modules for authentication and databases.

60
New cards

Sinatra Inspiration

The Ruby web framework known for simplicity and minimalism that inspired the creation and design philosophy of Flask.

61
New cards

BSD License

The open-source license under which Flask was initially released, allowing for free and open distribution and use.

62
New cards

Flask vs. Django

  • Flask is a micro-framework providing only essential tools, whereas

  • Django is a "full-stack" framework that integrates ORM systems, authentication, and an MTV (Model-Template-View) architectural pattern by default.

63
New cards

Server-Side Rendering (SSR)

The process used by Flask where the complete HTML content is generated on the server before being sent to the client browser, resulting in a new document for each request.

64
New cards

Client-Side Rendering (CSR)

The process used by React where the browser downloads JavaScript to dynamically generate and manipulate HTML within the client environment, updating locally without a full-page reload.

65
New cards

Route Decorator

The @app.route() syntax used to associate a specific URL pattern with a Python function; when the URL matches, Flask executes that function.

66
New cards

Root URL (/)

The base address of a website; in Flask, this URL pattern typically corresponds to the index() function.

67
New cards

Server Response Types

After executing a function, the Flask server typically sends back an HTML document, plain text, JSON data, or a redirect instruction to the client.

68
New cards

Main Runtime Block

The if __name__ == "__main__": statement which ensures the Flask server only starts when the script is executed directly, and not when imported as a module.

69
New cards

WSGI-Compatible

Refers to how Flask runs as a Web Server Gateway Interface application, which is the standard protocol for Python web development.

70
New cards

Flask Development Server

A temporary server created by Flask upon execution that listens on a specified network port (default is 5000) for incoming HTTP requests.

71
New cards

app = Flask(name)

The code used to initialize the Flask class and create an application object, which serves as the central registry for the app.

72
New cards

name

A built-in Python variable passed to the Flask constructor to help the framework determine the root path of the application and locate resources like templates and static files.

73
New cards

Secret Key

A cryptographic string, such as app.secret_key = "myfirstapp", used by Flask to securely sign session cookies and prevent client-side data tampering.

74
New cards

debug=True

A parameter in the app.run() method that activates automatic reloading of the server when code changes and provides detailed error messages for troubleshooting.

75
New cards

Query Parameters (GET)

Additional data supplied through key-value pairs that appear after a question mark (?) in a URL; used for filtering or optional values.

76
New cards

request.args.get()

The Flask method used to retrieve specific values from query parameters.

77
New cards

Path Variables

Dynamic elements embedded directly within the URL pattern (e.g., <username>) that capture variable input as arguments for the function.

78
New cards

Dynamic URL Parameters

A route like @app.route("/profile/<username>/<age>") where Flask automatically converts dynamic segments into function arguments

79
New cards

Dynamic Argument Example

In the URL /profile/Ana/21, "Ana" and "21" are extracted by Flask and passed directly into the profile(username, age) function.

80
New cards

PIP

The Python package installer used to download libraries; it is included by default in Python versions 3.4 and later.

81
New cards

pip -- version

The command used in the terminal to check if PIP is already installed on your system.

82
New cards

python -m ensurepip --upgrade

The specific command used to download and install/upgrade PIP if it is not currently installed.

83
New cards

pip install flask

The terminal command used to download and install the Flask web framework to your local environment.

84
New cards

Flask Instance Creation

The lines from flask import Flask and app = Flask(__name__) which import the library and create the application instance.

85
New cards

app.secret_key

A required configuration setting used by Flask to secure user sessions.

86
New cards

@app.route("/")

A decorator and function that tells Flask to display specific content (like "Hello World") when the user loads the homepage.

87
New cards

if __name__ == "__main__":

The code added at the bottom of the file to ensure the Flask server only starts when the file is run directly.

88
New cards

app.run(debug=True)

The command inside the runtime block that starts the web server and enables debug mode for easier troubleshooting.

89
New cards

python filename.py

The terminal command executed inside the project folder to start the Flask web server.

90
New cards

http://127.0.0.1:5000/

The default local address (localhost) where you can view your running Flask application in a web browser.

91
New cards

templates folder

A specific folder that must be created inside flask_project to store all HTML files, as Flask is designed to look for templates only in this directory.

92
New cards

index.html

A standard HTML file created inside the templates folder to define the structure and layout of a webpage.

93
New cards

render_template

A Flask function that must be imported to allow the server to load and display HTML files from the templates folder.

94
New cards

Flask Form

The process by which user input is collected through an HTML form, transmitted via HTTP (usually POST), and handled by Flask using the request.form object. It ensures secure data handling, validation, and user-friendly navigation through the Post/Redirect/Get pattern.

95
New cards

Redirect

Is a process of sending the user from one URL to another URL. This is commonly used after a form submission to prevent duplicate submissions and to guide the user to the correct page after completing an action.

96
New cards

redirect()

  • Is a function that is used to redirect the user.

  • Automatically sends user to another route.

97
New cards

url_for()

  • Finds the URL based on function name.

  • This function is used to generate the correct URL for a specific route function instead of writing the URL manually. This makes the code more flexible and easier to maintain because if the URL changes, the function name remains the same.

  • This function is commonly used together with redirect() to navigateusers to another page after processing data from a form.

98
New cards

Post/Redirect/Get (PRG)

  • The ___ pattern is a web development design pattern used to prevent duplicate form submission. In this pattern, when a user submits a form, the server processes the data using a POST request, then redirects the user to another page using a redirect, and finally the new page is loaded using a GET request.

  • This pattern prevents the form from being resubmitted if the user refreshes the page and improves the overall user experience.

99
New cards

GET Method

  • Is an HTTP request method used to request or retrieve data from the server.

  • When using ___, the data is visible in the URL as query parameters.

  • This method is commonly used for search functions, filtering data, and retrieving information from the server.

  • They are not recommended for sensitive data because the information is visible in the browser URL.

100
New cards

POST Method

  • Is an HTTP request method used to send data from the client (browser) to the server.

  • The data sent using ___ is not visible in the URL, making it more secure than GET.

  • This method is commonly used in login forms, registration forms, and other forms that handle sensitive data.

  • They are commonly used when submitting HTML forms.