import sys def main(): if(len(sys.argv)<3): print "Please give three numbers to run this program" sys.exit(0) # use this to quit the program num1 = float(sys.argv[1]) num2 = float(sys.argv[2]) num3 = float(sys.argv[3]) #1. Implement a function myMax, and use that function to get the maximum number (Max123) between num1, num2, and num3. Max123 = myMax(num1,num2,num3) print Max123 #2. Implement a function ProcessScore which takes the value of Max123 as input parameter, and return 'A' if the input is larger than 90, 'B' if the input is in [80,90), otherwise return 'C' Score = ProcessScore(Max123) print Score #3. Consider the following tuple, implement a function countScore which count how many times the score in the tuple myTuple = ("A","B","A","A","C","C","C","B","A","B","B","C","A","B","A","A","C","G","F","B","C") frequency = countScore(Score,myTuple) print frequency #4. Bonus: take myTuple as input parameter, return a dictionary, the key is the unique letter in myTuple, the value is the frequncy of that letter. # in this case, you should get: "A":7, "B":6, "C":6, "G":1, "F":1 myDict = StatisticAnalysis(myTuple) key = "A" if key in myDict: # this is check if the key is existed in the dictionary print key + ":" + str(myDict[key]) key = "B" if key in myDict: print key + ":" + str(myDict[key]) key = "C" if key in myDict: print key + ":" + str(myDict[key]) key = "G" if key in myDict: print key + ":" + str(myDict[key]) key = "F" if key in myDict: print key + ":" + str(myDict[key]) # implement all your function here ... # This is the standard boilerplate that calls the main() function. if __name__ == '__main__': main()