Python

Checksum Checker

Download at https://github.com/brettius/checksum-checker Simple checksum checker to compare two different checksums, or any strings. print(‘Checksum Checker v1.0\n’) check_one = input(‘Enter first checksum:\n\n’) check_two = input(‘\nEnter second checksum:\n\n’) if check_one.strip() == check_two.strip():    print(‘\nSuccess! Matching checksums’) else:    print(‘\nDid not match. Re-download the file.’)  input(‘\nPress a key to exit’)

Continue Reading
Code, Python

D&D Battle Tracker

A text program that keeps track of important statistics for the Dungeons and Dragons role playing game. import pickle print(‘Barbarian Battle Tracker’) def main(): player_stats = {‘HP’: 0, ‘Max HP’ : 0 ,’Hit Dice’: 0, ‘Exp’: 0, ‘Rages’:0} run = True while run == True: player_stats_print_dictionary(player_stats) menu = main_menu() if menu == 1: player_stats[‘HP’] = damage(player_stats[‘HP’]) elif menu == 2:…

Continue Reading
Code, Python

Farmer River Crossing Puzzle

Download at https://github.com/brettius/farmer-river-crossing-game One of the classic puzzles. How does a farmer get a fox. a goose corn across a river? Constraints are that only one item can be taken at a time, and certain items cannot be left with each other, for example the goose who will eat the corn. The highest level function is defined first, that of…

Continue Reading
Code, Python

D&D Multi Dice Roller

Download full code at https://github.com/brettius/d-and-d-dice-roller A multiple dice roller program, suitable for Dungeons and Dragons role playing game. The user can select a number of dice and amount, then roll the selected dice. First, a function is built to get the name of the dice, for example, a ‘d4’, and how many are chosen, and insert the name, the lowest and…

Continue Reading