Skip to content

Instantly share code, notes, and snippets.

View toonarmycaptain's full-sized avatar
💭
Looking for FTE.

David toonarmycaptain

💭
Looking for FTE.
View GitHub Profile
@toonarmycaptain
toonarmycaptain / bulletPointAdder.py
Last active August 2, 2017 03:54
Bulklet Point Adder
#! python3
# -*- coding: utf-8 -*-
# bulletPointAdder.py - Adds Wikipedia bullet points to the start
# of each line of text on the clipboard.
"""
Created on Mon Jul 31 22:43:29 2017
Script gets the text from the clipboard, add a star and space to the beginning
of each line, and then paste this new text to the clipboard.
@toonarmycaptain
toonarmycaptain / Collatz.py
Last active August 1, 2017 02:52
Collatz sequence function
#! python3
# -*- coding: utf-8 -*-
# Collatz.py - a Collatz sequence program
"""
Created on Mon Jul 17 11:28:00 2017
@author: david.antonini
Takes input from user and runs Collatz sequnce, printing each step
"""
@toonarmycaptain
toonarmycaptain / FantasyGameInventory.py
Created July 27, 2017 20:07
Automate the Boring Stuff Chpt 5 - Fantasy Game Inventory
stuff = {'rope': 1, 'torch': 6, 'gold coin': 42, 'dagger': 1, 'arrow': 12}
#def displayInventory(inventory):
# total_items = 0
# for item in inventory:
# print(str(inventory[item])+' '+item)
# total_items += inventory[item]
# print("Total number of items: "+str(total_items))
# This worked but I like the following better: