This commit is contained in:
Maxwell Jeffress
2026-02-20 11:42:22 +11:00
commit 3fdb90a652
5 changed files with 189 additions and 0 deletions

30
old/activity-core.py Normal file
View File

@@ -0,0 +1,30 @@
# Created by Maxwell Jeffress, 11/02/2026
# Does add, subtract, multiply, and divide operations on 2 numbers.
left = 0
right = 0
# GET left (user input)
try:
left = int(input("Left side: "))
except ValueError:
print("Invalid input!")
exit(1)
# GET right (user input)
try:
right = int(input("Right side: "))
except ValueError:
print("Invalid input")
exit(1)
add = left + right
sub = left - right
mul = left * right
div = left / right
print("left + right =", add)
print("left - right =", sub)
print("left * right =", mul)
print("left / right =", div)

19
old/activity-deep.py Normal file
View File

@@ -0,0 +1,19 @@
# Created by Maxwell Jeffress on 11/02/2026.
# Calculates the volume of a cube, square based pyramid, and cylinder.
import math
width = 0
try:
width = int(input("Width: "))
except ValueError:
print("Invalid input!")
exit(1)
cubeSize = width ^^ 3
print("Cube volume is", cubeSize)
cylinder = ( math.pi * (width / 2) ^^ 2 * width )
print("Cylinder volume is", cylinder)

35
old/activity2-core.py Normal file
View File

@@ -0,0 +1,35 @@
# Created by Maxwell Jeffress on 13/02/2026
# Does operations on values
left = 0
right = 0
op = ""
while True:
try:
left = int(input("Left: "))
except ValueError:
print("Invalid input")
continue
try:
right = int(input("Right: "))
except ValueError:
print("Invalid input")
continue
op = input("Operation: ")
match op:
case "+":
print(left + right)
case "-":
print(left - right)
case "*":
print(left * right)
case "/":
print(left / right)
case _:
print("That's not an operation")
if input("Continue? (y/N) ") != "y":
break

41
old/activity2-transfer.py Normal file
View File

@@ -0,0 +1,41 @@
# Created by Maxwell Jeffress on 13/02/2026
# Helps troubleshoot stuff on a computer
def is_issue_fixed():
userInput = input("Was the issue fixed? (yes/no) ")
if userInput.lower() in ["y", "yes", "ye"]:
return True
else:
return False
def finish():
print("Goody! Thanks for using the troubleshooter")
def power_issue():
print("If it's a laptop, does the battery have charge?")
print("If it's a desktop, is the power cord plugged in correctly?")
print("Try connecting the power cord.")
def power_issue_2():
print("There might be an internal issue with the computer.")
print("If you'")
print("What is your issue? Type the number associated with the issue")
print(" 1) No power")
print(" 2) No sound")
print(" 3) No internet access")
while True:
option = input("Choose a number (between 1 and 3)")
match option.lower():
case "1" | "no power" | "power" | "power not working":
power_issue()
if is_issue_fixed():
finish()
power_issue_2()
case "2" | "no sound" | "sound" | "sound not working":
pass
case "3" | "no internet" | "no internet access" | "internet" | "internet not working":
pass