

Module 3 Tough Problem NOTES
Presentation
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Dr. Moriarty
FREE Resource
7 Slides • 0 Questions
1
By Dr. Moriarty
2
Problem 3 looked like the first two lines here
This for loop just starts at -1 and ends one before 1, so it prints out two hashtags. I ran it a second time here printing the value of i so you could see what it holds...
For loops with negative numbers
3
Even when they are negative numbers, for loops always have (start point, end point, counter) inside their parenthesis!
4
For this problem, you should write down the list and lablel its regular AND negative indices.
For this problem, -1 has an index of -1, 1 has an index of -2, and 3 has an index of -2.
Line 2 puts whatever is in list slot -2 INTO list slot -1. So the last slot now contains a 1.
swapping list values with negative indices
5
notice that in all these examples the right value goes and OVERWRITES the value on the left.
If we wanted to truly swap and keep each value, we'd need a second temp variable!
6
For this problem, you want to figure out if the inequalities/equals check are true or false, then think about the or that links them.
logical operators
Remember if you have multiple ors, ands, and nots in one expression, do the not first, then the and, and save the or for last :)
7
By Dr. Moriarty
Show answer
Auto Play
Slide 1 / 7
SLIDE
Similar Resources on Wayground
6 questions
Algebra - Lesson Quadratic of Best Fit
Presentation
•
12th Grade
9 questions
Brain Scans
Presentation
•
12th Grade
6 questions
online school expektashons
Presentation
•
University
7 questions
Discrete Math Live Quiz
Presentation
•
University
7 questions
Born A Crime Apartheid
Presentation
•
12th Grade
7 questions
Windows Desktop Elements
Presentation
•
12th Grade
8 questions
Gay-Lussac Law
Presentation
•
12th Grade
8 questions
Digitális platformok online workshop
Presentation
•
KG
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade