This file contains 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
a1 = "-" | |
a2 = "-" | |
a3 = "-" | |
b1 = "-" | |
b2 = "-" | |
b3 = "-" | |
c1 = "-" | |
c2 = "-" | |
c3 = "-" | |
up = "up" |
This file contains 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
import random | |
import time | |
humanpop = random.randint(1000000000,50000000000) | |
monsterpop = random.randint(1000000000,50000000000) | |
continue3 = input("If continuing game, type yes, no spaces or punctuation, lower case. ") | |
if continue3 == "yes": | |
continue1 = input("If continuing game, input humanpop. ") | |
continue2 = input("If continuing game, input monsterpop. ") | |
try: | |
humanpop = int(continue1) |
This file contains 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
import time | |
item1 = 0 | |
item2 = 1 | |
import time | |
fib = [0,1] | |
counter = 2 | |
fibfile = open("Fibonacci Sequence.txt","w") | |
fibfile.write(str(1)) | |
fibfile.write(""" | |
""") |
This file contains 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
import random | |
import time | |
# going to create a starter pack for text games in Python. | |
# TABLE OF CONTENTS: | |
# Contains: | |
# choices(a): # Choices is going to accept a, an integer, how many choices you're giving the player. | |
# Returns integer of the choice, 1 to a. | |
# choicestest(): Tests choices(a). | |
# | |
# createcharacter(): creates a list that has traits of a random character, and can be used to create a proper reference to the character. |
This file contains 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
#If the program works correctly you should be able to give it a txt with a word on each line and it should give you a new txt with the words sorted alphabetically. | |
filename = input("Specify txt you wish to sort: ") | |
with open(filename,"r") as sortfile, open("Sorted File.txt","x") as newfile: | |
newstring = sortfile.read() | |
newlist = newstring.split() | |
newlist.sort() | |
for n in newlist: | |
newfile.write(n) | |
newfile.write(""" | |
""") |
This file contains 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
#If the program works correctly you should be able to give it a txt with a word on each line and it should give you a new txt with the words sorted alphabetically. | |
#It should also theoretically give a list of all the words at the end. | |
#Use chammy.txt to test. | |
filename = input("Specify txt you wish to sort: ") | |
with open(filename,"r") as sortfile, open("Sorted File.txt","x") as newfile: | |
newlist = [] | |
for line in sortfile: | |
item = sortfile.readline() | |
newlist.append(item) | |
newlist.sort() |
This file contains 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
import time | |
import sys | |
import random | |
version = "1" | |
print("Note: Timings are not exact. Transcript is marked at the 15 second reading interval.") | |
textname = input("Name of text file you wish to open. ") | |
wordspermin = input("Mark X words per minute. Input X. ") |
This file contains 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
import time | |
import sys | |
import random | |
timeofday = random.choice(["morning","afternoon","evening"]) | |
#time of day and the whole beginning of this program means nothing. It is an insert for if I share this program with stenographer educators so that they're not completely lost, and would be rewritten in the event I get this program to work properly. | |
print("Good " + timeofday + ". I am Blade. I am programmed to insert timings into ASCII files and have no clue what time of day it is.") | |
textname = input("Name of text file you wish to open. ") | |
#textname is important. User must specify the exact name of the file. In this build, the .txt must be in the same folder as the .py program. | |
wordspermin = input("Mark X words per minute. ") |
This file contains 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
import time | |
import random | |
#This is almost exactly the same code as Ultimate Rock Paper Scissor but it cheats so that the player can never win. | |
game1 = "game1" | |
game2 = "game2" | |
game3 = "game3" | |
game4 = "game4" | |
game5 = "game5" | |
game6 = "game6" | |
game7 = "game7" |
This file contains 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
import random | |
import time | |
game1 = "game1" | |
game2 = "game2" | |
game3 = "game3" | |
game4 = "game4" | |
game5 = "game5" | |
game6 = "game6" | |
game7 = "game7" | |
game8 = "game8" |