This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# | |
#Computer Project #2 | |
# | |
#Algorithm | |
# | |
# Get if user wants to play the game | |
# Initialize starting state variables for a new game | |
# Display current amount of stones in each pile (5) | |
# Until the game is won, player and computer alternate turns taking stones |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################### | |
# Computer Project #3 | |
# | |
# Algorithm | |
# Prompt to encrypt, decrypt, or quit | |
# Initialize variables that need to be appended to or used in the program | |
# Generate string of all lowercase alphabetic characters | |
# Ask for keyword of only alphabetic charactes and less than 26 characters | |
# Ask for a message to encrypt/decrypt | |
# If Encrypt: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dictionary of all elements matched with their atomic masses. | |
elements_dict = {'H' : 1.008,'HE' : 4.003, 'LI' : 6.941, 'BE' : 9.012,\ | |
'B' : 10.811, 'C' : 12.011, 'N' : 14.007, 'O' : 15.999,\ | |
'F' : 18.998, 'NE' : 20.180, 'NA' : 22.990, 'MG' : 24.305,\ | |
'AL' : 26.982, 'SI' : 28.086, 'P' : 30.974, 'S' : 32.066,\ | |
'CL' : 35.453, 'AR' : 39.948, 'K' : 39.098, 'CA' : 40.078,\ | |
'SC' : 44.956, 'TI' : 47.867, 'V' : 50.942, 'CR' : 51.996,\ | |
'MN' : 54.938, 'FE' : 55.845, 'CO' : 58.933, 'NI' : 58.693,\ | |
'CU' : 63.546, 'ZN' : 65.38, 'GA' : 69.723, 'GE' : 72.631,\ | |
'AS' : 74.922, 'SE' : 78.971, 'BR' : 79.904, 'KR' : 84.798,\ |