diff --git a/Daily Practice Challenges/Talking Clock.py b/Daily Practice Challenges/Talking Clock.py new file mode 100644 index 0000000..71d7e15 --- /dev/null +++ b/Daily Practice Challenges/Talking Clock.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +""" +Created on Sat Jul 01 10:53:08 2017 + +@author: Mackenzie +""" +hourlist = ['twelve', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven'] +minute10list =['o', 'teen', 'twenty', 'thirty', 'fourty', 'fifty'] +minutelist = ['', 'one', ' two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'] +teenlist = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'] +print "Welcome to the talking clock. The input format is hh:mm" +clockinput = '' +while clockinput != "!q": + clockinput = raw_input("\n Enter Time here: ") + #convert into hour + hour = clockinput[0:2] + tenminute = clockinput[3:4] + minute = clockinput[4:5] + inthour = int(hour) + intminute = int(minute) + inttenminute = int(tenminute) + #print inthour + #print intminute + + #output + #Hour Conversion + if inthour >= 12: + inthour = inthour - 12 + ending = 'pm' + else: + ending = 'am' + hourstring = hourlist[inthour] + #10inute conversion + if inttenminute == 1: + tenminutestring = '' + minutestring = teenlist[intminute] + else: + tenminutestring = minute10list[inttenminute] + minutestring = minutelist[intminute] + print "It's",hourstring, tenminutestring, minutestring, ending \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2514053 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Python + +#A Place to store python coding practice projects diff --git a/charCreate.py b/charCreate.py new file mode 100644 index 0000000..56b0256 --- /dev/null +++ b/charCreate.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +""" +Created on Mon May 01 19:17:55 2017 + +@author: Mackenzie +""" + +def charCreate(): + classlist = ["Bard", "Fighter", "Wizard", "Druid", "Barbarian", "Cleric", "Warlock", "Sorceror", "Rogue", "Ranger", "Paladin"] + classIntrostring = ''' + What class does your character want to be? Enter the following to select your class: + 1: Bard + 2: Fighter + 3: Wizard + 4: Druid + 5: Barbarian + 6: Cleric + 7: Warlock + 8: Sorceror + 9: Rogue + 10: Ranger + 11: Paladin + ''' + racelist = ["Human", "Human (Variant)", "Elf", "Half-Elf", "Half-Orc", "Dwarf", "Gnome", "Halfling", "Tiefling", "Dragonborn"] + raceIntroString = ''' + What Race does your character want to be? Enter the following to select your race: + 1: Human + 2: Human (variant) + 3: Elf + 4: Half-Elf + 5: Half-Orc + 6: Dwarf + 7: Gnome + 8: Halfling + 9: Tiefling + 10: Dragonborn + ''' + statDistributionString = ''' + + 1: Strength + 2: Dexterity + 3: Constitution + 4: Intelligence + 5: Wisdom + 6: Charisma + ''' + fixedstatDistributionString = textwrap.dedent(statDistributionString).strip() + fixedraceIntroString = textwrap.dedent(fixedraceIntroString).strip() + StatList = [0,0,0,0,0,0] + fixedClassIntrostring = textwrap.dedent(classIntrostring).strip() + print fixedClassIntrostring + + print("Time to make your character\n") + print("First step is Stat Distribution using standard distribution\n") + print(fixedstatDistributionString) + selstat1 = input("What stat do you want 15 in: ") + selstat1int = int(selsat1) + selstat2 = input("What stat do you want 14 in: ") + selstat2int = int(selsat2) + selstat3 = input("What stat do you want 13 in: ") + selstat3int = int(selsat3) + selstat4 = input("What stat do you want 12 in: ") + selstat4int = int(selsat4) + selstat5 = input("What stat do you want 10 in: ") + selstat5int = int(selsat5) + selstat6 = input("What stat do you want 8 in: ") + selstat6int = int(selsat6) + StatList(selstat1int) = 15 + StatList(selstat2int) = 14 + StatList(selstat3int) = 13 + StatList(selstat4int) = 12 + StatList(selstat5int) = 10 + StatList(selstat6int) = 8 + #Class Selction + print(classIntrostring) + selclass = input("Enter what class you want: ") + selclassint = int(selclass) + dclass = classlist(selclassint) + #Race Selction + print(raceIntroString) + selrace = input("Enter what Race you want: ") + selraceint = int(selrace) + name = input("what is your character's name? ") + drace = racelist(selraceint) + data = StatList.append([dclass, drace, name]) + return [data] + \ No newline at end of file diff --git a/dndClassCreator.py b/dndClassCreator.py new file mode 100644 index 0000000..f76b481 --- /dev/null +++ b/dndClassCreator.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +""" +Created on Tue Apr 18 19:06:47 2017 + +@author: Mackenzie +""" +# DND 5E Character Creator +print "Welcome to Mack's DND 5E Character Creator and Manager" +validmenu = 0 +while validmenu == 0: + print "Enter C to create a new character or R to review an old character or Q to Quit" + option = input("Enter Choice: ") + if option == "C": + validmenu = 1 + elif option == "R": + validmenu = 2 + elif option == "Q" + print "goodbye" + #Enter Quit Command Here + else: + print "Answer Not Valid, Try Again" +if validmenu = 1: + data = charCreate() + newstatslist = [data(1),data(2),data(3),data(4),data(5),data(6)] + newdclass = data(7) + newdrace = data(8) + newname = data(9) + newchar = Character(newname,newstatslist,newdclass,newdrace) + +if validmenu = 2: + #Load Character Creation File + +class Character: + "Common base class for all characters" + def __init__(self, name, statslist, dclass, drace): + self.dclass = dclass + self.drace = drace + self.statslist = statslist + self.name = name + def displayCharacterRecord: + print "Name : ", self.name, ", Race: ", self.drace, ", Class: ", self.dclass + print "\n Strength: ", self.statslist(1) + \ No newline at end of file diff --git a/untitled1.py b/untitled1.py new file mode 100644 index 0000000..1743f25 --- /dev/null +++ b/untitled1.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +""" +Created on Tue Apr 18 18:53:33 2017 + +@author: Mackenzie +""" + +print "hello world" \ No newline at end of file