| Date | |
|---|---|
| 13 April 2026 | Assigned |
| 20 April 2026 | Due |
| Progress |
For this lab, you'll collaborate with a teammate to develop a system to gauge the relative danger level of a series of integers. This will likely require looking up a fair amount of new techniques and strategies, but you'll have your team to help you!
This assignment addresses the following course learning objective(s):
- Apply Python programming fundamentals to execute and explain computer code that implements interactive, novel solutions to a variety of computable problems.
- Implement code consistent with industry-standard practices using professional-grade integrated development environments (IDEs), command-line tools, and version control systems.
- Analyze and suggest revisions to existing Python language code to add functionality or repair defects.
- Evaluate the practical and ethical implications of writing computer code and discuss the contexts, perceived effects, and impacts exerted on and by computer code as a cultural force or artifact.
- Design, describe, and implement original projects incorporating industry-standard practices and Python language fundamentals.
This assignment requires you to connect to a remove server and exchange JSON data (like a dictionary, but transmittable across the wide, wide internet). This lab has another component: competition. You'll need to design your program(s) to "farm" the maximum amount of "sequences" (explained below) to determine their relative "danger" level.
As such, your programs should be able to run in the background for a period of time and contribute successful assessments of given sequences to your team's overall score.
Important
Of course, the most important part of the competition is seeing the Leaderboard. You can access it any time at: https://dev.chompe.rs/leaderboard.
Sequences are groups of digits (0-9). As an example: 01110110000111 is a sequence; 0204010510011000101 is also a sequence.
Sequences have "danger" levels. For example: 00010020404555505014 might have a "danger" level of 4. And, let this instructor tell you, it is dangerous. To help tease out the rule: 00148501401
| Sequence | Danger Level | Is it dangerous? |
|---|---|---|
00148501401 |
3 |
Nope. |
0004191980123 |
3 |
Absolutely. |
000001001010101111101010110111111111 |
7 |
Outrageously. |
0123456789 |
2 |
Not at all. |
0123456789 |
1 |
You'd better believe it. |
You'll need to ask a remote server to give you two things:
- a sequence
- a danger level
Your programs will need to respond to this sequence with an assessment of whether or not it is dangerous according to that level. You responses must be in the format of:
- team
- sequence
- danger_level
- assessment
When submitted to the server (by your program), you'll be given an acceptance message of True or False. True means your assessment was correct; False means it wasn't. Each correct response is worth 1 point. Only True answers recieve a point.
This lab only requires a main.py file with a few functions:
main(the driver function), which:- calls the
get_sequencefunction which gets a new sequence from the game server - calls
solveto assess them based on their danger level - calls the
submit_sequencefunction to send an assessment to the server
- calls the
solve(the sequence solver)- accepts
2parameters: the sequence under test and the danger level provided by the game server
- accepts
get_sequencetakes no parameters and returns adictwith the values provided by the game serversubmit_sequencewhich takes3parameters and returns the server's check. The parameters:- the sequence
- the danger level
- the assessment (
Truefor dangerous,Falsefor not)
First, you'll need to get cozy with JSON; we'll set up at least a one-way communication from the server as a class so that we're all on the same footing. We'll also cover the difference between an internet GET request and a POST request.
Important
As a team assignment, this repository does not allow direct commits to main. Here you'll have to use branches and reviews to ensure that the project functions and is generally well understood by the team.
In practice, this means that everyone must branch their changes and that each Pull Request requires 2 reviews before it can be merged.
Note
To grade this lab, use the uv run gatorgrade command.
Labs in this course are each worth 5 points. You are awarded different levels of points using the following rubric:
| Component | Value |
|---|---|
| Programming | 2 |
| Code Review | 2 |
| Writing | 1 |
| Total | 5 |
Your programming will be evaluated on the following characteristics:
- Program reflects startup expectations in
main - Program reads correct temperature
- Program displays relative temperature correctly using
LEDs
The output for this program relies on external LEDs to validate outputs/outcomes.
Either a Technical Leader TL or the instructor can perform a code review with you. This must be done before the due date for the assignment. You may accomplish this during a lab session, TL office hours, or during the instructor's office hours. Successful completion of this review (and an accompanying successful outcome) will earn points toward the code review portion of the assignment.
Even though this assignment is collaborative, each student must complete the code review on their own.
Students are expected to finish a summary document. This is a Markdown file containing questions. All questions must be answered fully. Typically, this means a word count is assessed.
For this assignment, the minimum required word count is 150.