Skip to content
Binary file added .DS_Store
Binary file not shown.
156 changes: 156 additions & 0 deletions your-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@

# Created by https://www.toptal.com/developers/gitignore/api/jupyternotebooks,python
# Edit at https://www.toptal.com/developers/gitignore?templates=jupyternotebooks,python

### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/

.ipynb_checkpoints
*/.ipynb_checkpoints/*

# IPython
profile_default/
ipython_config.py

# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/

# Jupyter Notebook

# IPython

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
pythonenv*

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# profiling data
.prof

# End of https://www.toptal.com/developers/gitignore/api/jupyternotebooks,python
115 changes: 115 additions & 0 deletions your-project/.ipynb_checkpoints/final-game-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Message encrypter and decrypter"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Welcome to the ultimate message encoder! It's time to send your secret statements encrypted through the Caesar Algorythm. Insert a message to make it secret and then decrypt it again."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# c = (x + n) % 26"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"import string\n",
"message = \"\"\n",
"def encrypter(message):\n",
" cipher_message = []\n",
" for letter in message:\n",
" if letter not in string.ascii_letters:\n",
" cipher_message.append(letter)\n",
" else:\n",
" cipher_message.append(string.ascii_letters[(string.ascii_letters.index(letter) + 9) % len(string.ascii_letters)])\n",
" cipher = \"\".join(cipher_message)\n",
" return cipher\n",
"\n",
"def decrypter(message):\n",
" cipher_message = []\n",
" for letter in message:\n",
" if letter not in string.ascii_letters:\n",
" cipher_message.append(letter)\n",
" else:\n",
" cipher_message.append(string.ascii_letters[(string.ascii_letters.index(letter) - 9) % len(string.ascii_letters)])\n",
" cipher = \"\".join(cipher_message)\n",
" return cipher"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"user_input = input(\"Write the message you want to encrypt: \")\n",
"encrypted_message = encrypter(user_input)\n",
"print(encrypted_message)\n",
"\n",
"input(\"Now, it's time to decrypt your previous message: \")\n",
"decrypted_message = decrypter(encrypted_message)\n",
"print(decrypted_message)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
27 changes: 15 additions & 12 deletions your-project/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
<img src="https://bit.ly/2VnXWr2" alt="Ironhack Logo" width="100"/>

# Title of Your Project
*[Your Name]*
# Message encryptor
*Anna Fonte Farré*

*[Your Cohort, Campus & Date]*
*Data Analytics, Barcelona & October 2020]*

## Content
## Table of contents
- [Project Description](#project-description)
- [Rules](#rules)
- [Workflow](#workflow)
- [Organization](#organization)
- [Links](#links)

## Project Description
Write a short description of your project. Write 1-2 sentences about the game you chose to build and why.
Program for encrypting and decripting messages using the "Caesar algorythm".

## Rules
Briefly describe the rules of the game.
The program will ask the user whether the user wants to encrypt or decrypt the message he or she will introduce. If the user wants to decrypt de message, the message will need to be encrypted with the same program.

## Workflow
Outline the workflow you used in your project. What are the steps you went through?
* Researching about encrypting algorithms
* Define functions for encrypt and decrypt
* Write code
* Identify errors

## Organization
How did you organize your work? Did you use any tools like a kanban board?
The project has been outlined and organized through the tool Trello. For developing the workflow of the program, pencil and paper have been used.

What does your repository look like? Explain your folder and file structure.
The repository containing the program consists of a folder that contains the main code with a Jupyter Notebook, a README file and a .gitignore file.

## Links
Include links to your repository, slides and kanban board. Feel free to include any other links associated with your project.

[Repository](https://github.com/)
[Slides](https://slides.com/)
[Trello](https://trello.com/en)
[Repository](https://github.com/annafonte/Project-Week-1-Build-Your-Own-Game.git)
[Slides](https://docs.google.com/presentation/d/1e6WbWhHjYtJWwWd75LXRHDzfJkQtPRpgjmM3JWMdToQ/edit?usp=sharing)
[Trello](https://trello.com/b/KTobmMsK/encrypter)
Loading