Answer:
Question1:
day = int(input("Enter in Numeric Today's day:"))
if (x == 15 or x == 30):
print("You have a payday today!")
if (x != 15 and x != 30):
print("Its is not certainly a payday today but dont feel bad.")
Question 2:
red = int(input("Enter the value for red: "))
green = int(input("Enter the value for green: "))
blue = int(input("Enter the value for blue: "))
if (red > 255 or red < 0):
print("The value of Red is not correct.")
if (green > 255 or green < 0):
print("The value of Green is not correct.")
if (blue > 255 or blue < 0):
print("The value of Blue is not correct.")
Explanation:
Please check the answer section.
Import csv
fileIn = open("data/bags.txt","r")
countPurse = 0
textFile= csv.reader(fileIn)
for bag in textFile:
if bag[ 1 ] == 'purse':
countPurse = countPurse + int(bag[6])
fileIn.close()
print("Number of purses:",countPurse)
Hi!
The 2016 Olympics took place from August 5th, 2016 - August 21st, 2016.