Create a list of 20 numbers and
(a) Sort the list
(b) (b) Print the reverse of the sorted list
Given the code:
myList = ['1','2','3','4','5']
for z in range(0,len(myList))
text = ' '.join(myList[z])
text.center(10)
(a) If this code is run in the shell, what is the output?
(b) If this code is a program that is then run in the shell, what is the output?
(c) Why is the output different?
(d) Fix the program to run the same in both environments
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here