# [ ] import https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/rainbow as rainbow.txt
!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/rainbow -o rainbow.txt
# [ ] Open rainbow.txt in read mode & read as list with .readlines()
rainbow_files = open('rainbow.txt','r')
rainbow_colors = rainbow_files.readlines()
# [ ] sort rainbow_colors list, iterate the list to print each color
rainbow_colors.sort()
for stuff in rainbow_colors:
print(stuff)
rainbow_files.close()
# [ ] The Weather: import world_mean_team.csv as mean_temp.txt
!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/world_temp_mean.csv -o mean_temp.txt
# [ ] The Weather: open file, read/print first line, convert line to list (splitting on comma)
mean_file = open('mean_temp.txt','r')
headings = mean_file.readlines(1)
print(headings)
mean = mean_file.read()
mean.split(',')
print(mean)
# [ ] The Weather: use while loop to print city and highest monthly average temp in celsius
city_temp = mean
city_temp.split(',')
while
# [ ] use curl to download https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/digits_of_pi as pi.txt
!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/digits_of_pi -o pi.txt
# [ ] Set up the project files and initial values
pi = open('pi.txt','r')
inp = input("what is your name")
print("hi")
seed = len(inp)
pi.seek(seed)
digit = pi.readlines(1)
guess = input("what is your guess (enter a single digit or 'q' to quit)")
correct = 0
wrong = 0
pi = open('pi.txt','r')
inp = input("what is your name")
print("hi")
seed = len(inp)
pi.seek(seed)
digit = pi.readlines(1)
guess = input("what is your guess (enter a single digit or 'q' to quit)")
correct = 0
wrong = 0
if digit == "":
digit = pi.readlines(2)
elif digit == "\n":
pi.seek(seed)
elif guess == digit:
print("correct")
correct += 1
else:
print("incorect")
wrong += 1
print(correct,wrong)