Skip to content

Instantly share code, notes, and snippets.

View tarunbod's full-sized avatar

Tarun Boddupalli tarunbod

  • GitHub
View GitHub Profile
{"scores":{"main":{"score":40,"max_score":50,"output":{"hints":["hint"]}}},"scoreboard":[97],"version":"2.0"}
@tarunbod
tarunbod / Controller.java
Created March 12, 2021 17:33
Import and Export with txt files
public class Controller {
/**
Controller method that is called when the user clicks "Import From File"
on the fourth tab in the application. This method asks the user to select
a text file that contains account database information, reads the file,
and populates the account database with the accounts found in the file.
Prints errors if the file could not be read or if it was in a bad format.
@param event the ActionEvent generated by the button press. Ignored for
our purposes.
*/

Lab 5.15

def caesar_cipher_encrypt(text, key, a):
    text = text.upper()
    encrypted_Text = ""
    for i in text:
        if i in a:
            index = (a.find(i) + key) % len(a)
            encrypted_Text = encrypted_Text + a[index]
        else: