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 as rnd | |
#ask user for number of dice | |
nDice = input("How many dice are we playing with? \n") | |
nSides = input("\nhow many sides each dice has? \n") | |
msg = "we're rolling "+nDice+" dice. Here are the results:\n" | |
try: | |
for x in range(int(nDice)): |
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
myfile = open("LearningPy/duplicatelines.txt","r") #replace with your file name | |
xString = myfile.readlines() | |
listOfWords = [] | |
for x in range(len(xString)): | |
line = xString[x] | |
#print(line) |
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
from googleapiclient.discovery import build | |
from googleapiclient.errors import HttpError | |
api_key='ADD_YOUR_API_KEY_HERE' | |
youtube=build( | |
'youtube', | |
'v3', | |
developerKey=api_key | |
) |