Reference no: EM132192643
Write 2 seperate programs in the language of python please.
1. Iterator for Prime Number (Sieve of Eratosthenes)
Write the sieve of Eratosthenes as a Generator Function.
2. Write a class named Permutation in a file named myPermutation.py that will generate on demand all the permutations of a given list.
Write a short main function that demonstrates its use on the following lists: [1, 2, 3, 4, 5], ['a', 'b', 'c', 'd', 'e', 'f', 'g'], ['b', 'c', 'a']. Please hard code the lists into your main function. (Do not use anything from the itertools module.)