Skip to content

ComputationalExpression/lab-9-game-client-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taking the Temperature

Image

Date
13 April 2026 Assigned
20 April 2026 Due
Progress Grade

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!

Learning Objectives

This assignment addresses the following course learning objective(s):

  1. Apply Python programming fundamentals to execute and explain computer code that implements interactive, novel solutions to a variety of computable problems.
  2. Implement code consistent with industry-standard practices using professional-grade integrated development environments (IDEs), command-line tools, and version control systems.
  3. Analyze and suggest revisions to existing Python language code to add functionality or repair defects.
  4. 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.
  5. Design, describe, and implement original projects incorporating industry-standard practices and Python language fundamentals.

Summary of the problem

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

Sequences are groups of digits (0-9). As an example: 01110110000111 is a sequence; 0204010510011000101 is also a sequence.

Danger Level

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.

So what is this assignment about?

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.

main.py

This lab only requires a main.py file with a few functions:

  • main (the driver function), which:
    • calls the get_sequence function which gets a new sequence from the game server
    • calls solve to assess them based on their danger level
    • calls the submit_sequence function to send an assessment to the server
  • solve (the sequence solver)
    • accepts 2 parameters: the sequence under test and the danger level provided by the game server
  • get_sequence takes no parameters and returns a dict with the values provided by the game server
  • submit_sequence which takes 3 parameters and returns the server's check. The parameters:
    • the sequence
    • the danger level
    • the assessment (True for dangerous, False for not)

What additional skills will we need?

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.

Assignment procedure

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.

Evaluation

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

Programming

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

Expected output

The output for this program relies on external LEDs to validate outputs/outcomes.

Code review

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.

Writing

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages