Due Date: January 26, 2024
UIL 2023 March
Assignment: Get out notebook paper.
Put a standard heading.
Your title is "CS UIL March 2023".
Skip a line.
Number from 1 to 40.
Divide the questions evenly between other Independent Study students.
The entire group will answer each questions and much agree on an answer.
Each student must explain select questions to Mr. Cusack to get a signature.
(I will discuss this with you during class.)
After completion of you paper.
You will take a photo.
Turn it into google classroom.
Click herer to see the questions.
Due Date: February 22, 2024
New Assignment (Mr. Cusack will talk about this more in class)
Purpose: Verify new Cyber Range id and password. Also, practice python.
Run this in interactive mode.
Starting screen recording for this sessions.
Name of saved file: PX_Interactive_lastname.mp4 (Video of you running the program)
Be sure to drop these off into google classroom.
Split the program into two parts
Half way into the program.
run the commands below
1. print("Hello my name is Joe Cusack")
2. x = 5
3. y = 8
4. z = -34
5. m = x + y + z
6. print("The value of x is: " + x)
7. print("The value of y is: " + y)
8. print("The value of z is: " + z)
9. print("The value of m is: " + m)
10. if m > 0:
11. print("Positive number")
12. else:
13. print("Negative number")
l4. for i in range(10)
15. print("Value of i" + i)
16. greet("Hello World")
17. my_list = [20, 18, 16, 14, 12]
18. text = "awesome"
19. print(text.upper())
Insert bottom part for time.
use nano to create a python file.
example
nano PX_rockPaper_lastname.py
Be sure to create the following files:
PX_rockPaper_lastname.py (Actual python program)
PX_rockPaper_lastname.txt (Copy of python program (use google docs))
PX_rockPaper_lastname.png (Screen shot of program running)
PX_rockPaper_lastname.mp4 (Video of you running the program)
Be sure to drop these off into google classroom.
Source code:
from random import randint
#create a list of play options
t = ["Rock", "Paper", "Scissors"]
#assign a random play to the computer
computer = t[randint(0,2)]
#set player to False
player = False
while player == False:
#set player to True
player = input("Rock, Paper, Scissors?")
if player == computer:
print("Tie!")
elif player == "Rock":
if computer == "Paper":
print("You lose!", computer, "covers", player)
else:
print("You win!", player, "smashes", computer)
elif player == "Paper":
if computer == "Scissors":
print("You lose!", computer, "cut", player)
else:
print("You win!", player, "covers", computer)
elif player == "Scissors":
if computer == "Rock":
print("You lose...", computer, "smashes", player)
else:
print("You win!", player, "cut", computer)
else:
print("That's not a valid play. Check your spelling!")
#player was set to True, but we want it to be False so the loop continues
player = False
computer = t[randint(0,2)]