CPSC120 Lab 7


  1. Anagram

    Create a program in a file called anagram.py that prompts the user to enter two lines of text. The program should print whether the two lines are an anagram. A string is an anagram of another string if every letter appears the same number of times in each string. The program should ignore all non-alphabetic characters and ignore the case of alphabetic characters.

  2. Draw Cards

    Create a program in a file called cards.py that prints five random cards from a deck of playing cards. Every card in the deck should have an equal probability of being printed and it should not be possible for one card to be printed twice.

  3. Average Deviation

    Create a program called deviation.py that prompts the user for a comma separated list of numbers and prints the average deviation of all of the numbers. The deviation of one number in the list is the difference between the number and the average of the list. The average deviation is the average of the deviations of all numbers in the list.


Submit a zip file of your code on the course Inquire site that uses your last names as the file name.