Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .github/.keep
Empty file.
30 changes: 30 additions & 0 deletions .github/workflows/classroom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Autograding Tests
'on':
- workflow_dispatch
- repository_dispatch
permissions:
checks: write
actions: read
contents: read
jobs:
run-autograding-tests:
runs-on: ubuntu-latest
if: github.actor != 'github-classroom[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: caesar test
id: caesar-test
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: caesar test
setup-command: pip install pytest
command: pytest tests.py
timeout: 10
max-score: 100
- name: Autograding Reporter
uses: classroom-resources/autograding-grading-reporter@v1
env:
CAESAR-TEST_RESULTS: "${{steps.caesar-test.outputs.result}}"
with:
runners: caesar-test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Open in Visual Studio Code](https://classroom.github.com/assets/open-in-vscode-2e0aaae1b6195c2367325f4f02e2d04e9abb55f0b24a779b69b11b9e10269abc.svg)](https://classroom.github.com/online_ide?assignment_repo_id=15551968&assignment_repo_type=AssignmentRepo)
# Caesar Cipher Exercise
Code Louisville Python programming exercise.

Expand Down
13 changes: 12 additions & 1 deletion cipher.py
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# add your code here
import string

plain_text = "sarah likes learning python!"
shift = 5

alphabet = string.ascii_lowercase
shifted = alphabet[shift:] + alphabet[:shift]
table = str.maketrans(alphabet, shifted)

encrypted = plain_text.translate(table)

print (encrypted)