This file contains hidden or 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
from csv import reader, DictReader | |
from sys import argv, exit | |
sequences = {} | |
#validate input | |
if len(argv) < 3: | |
print("Usage:", "python dna.py data.csv sequence.txt") | |
exit(1); |
This file contains hidden or 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
from cs50 import get_float | |
# Get positive float from user | |
while True: | |
change = get_float("Change owed: ") | |
if change > 0: | |
break | |
# declare variables | |
total, count = change * 100, 0 | |
# calculate count of coins | |
for x in [25, 10, 5, 1]: |