100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

Algebra 2

Rating
-
Sold
-
Pages
5
Uploaded on
09-01-2026
Written in
2025/2026

Notes on algebra 2 with examples

Institution
Sophomore / 10th Grade
Course
Math









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Sophomore / 10th grade
Course
Math
School year
2

Document information

Uploaded on
January 9, 2026
Number of pages
5
Written in
2025/2026
Type
Class notes
Professor(s)
Oli
Contains
All classes

Content preview

I. Conditionals (if/elif/else)

Concept Syntax Key Rule
Example

Basic if if: Code runs ONLY if the condition is True.

if/elif/else if c1: ... elif c2: Only ONE branch executes. The program executes the
... else: ... code block for the FIRST condition that is True, then
immediately skips the rest of the block.

Precedence if x > 1: ... elif Order Matters! If x=5, the x > 1 branch is executed, and
x > 3: ... the x > 3 branch is ignored because the first condition was
met.



II. Loops
A. While Loops

Concept Syntax Example Key Rules

Basic while condition: Executes as long as the condition
while remains True.

Loop Requires a variable to be initialized
Control before the loop. This variable must be
updated inside the loop to eventually
make the condition False.

Infinite while True: This loop runs forever unless
Loop stopped by a break statement or a
return statement (which exits the
whole function).

B. For Loops

Concept Syntax Example Key Rules

, Iteration for char in "Missouri": Executes once for each element (character)
over String in the sequence. Variable char automatically
takes on the value of the next element.


range() range(start, stop, step) Generates a sequence of numbers.
Function

range() 1. stop is Exclusive: Counting
Rules goes up to but NOT including
the stop value.


2. Defaults: If omitted, start
defaults to 0, and step defaults
to 1.



range() Call Output Sequence (What's Printed)

range(5) 0, 1, 2, 3, 4

range(1, 20, 5) 1, 6, 11, 16

range(0, 12*n + 1, n) 0, n, 2n, ..., 12n



III. Strings and Input

Concept Syntax / Example Key Rule

Input Type user_input = The input() function ALWAYS returns data as the
input('Enter:') string type, regardless of what the user types. You
must use int() or float() to convert it for math.


Indexing "Missouri"[0] -> 'M' Characters are accessed by their index, starting at 0.
$33.89
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
Candy2590

Get to know the seller

Seller avatar
Candy2590
View profile
Follow You need to be logged in order to follow users or courses
Sold
New on Stuvia
Member since
13 hours
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions