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
#! 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. |
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
#! 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 | |
""" |
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
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: |