Description
IS 415/615
Assignment
Loops
Create list of random elements, with values ranging from 100. Store all the multiples of all the multiples of and all the multiples of in separate lists. If number is multiple of it shouldn’t appear in the multiples of multiples of lists. Print all multiples lists, as well as the list of remaining elements, that not multiple of of the Output the results in ascending order. Feel free use the inbuilt sorting functions. For example, my output looks like:
[IS 615 only] Modify the code that there duplicates in the random elements. For example, in the screenshot above, there shouldn’t double Your code should print the list of duplicate elements found (sorted in ascending order):
Assignment
IS 415/615
Create table of powers. The program should calculate the square, cube and fourth power
of the numbers from where is provided the command line as input argument. Your code should check that the input argument has been provided, and ensure that it is integer greater than equal You need deal with the possibility of the input not being integer (text for example). Make sure that your output table is padded dynamically, that there is always at least spaces between each column. For example, my output looks like
And
[IS 615 only] Modify the code that instead of providing the maximum value calculate the square, cube and fourth power for the user provides the upper limit of the fourth power calculation. For example, if the user provides the number 256, then the program will only calculate up because 4*4*4*4 = 256. But if the user provides then the program calculates up value of because 9*9*9*9 = and 10*10*10*10 = 10000, which is big:




