Hi Guys
Any help on this will be truly appreciated. I'm writing program which ask, first , for the length of a list, followed by the inputting the elements in the list. I want the program to print 'YES' if A contains numbers 1, 2, 3 (all of them)in an arbitrary order and "NO" otherwise. For instance, the program should print "YES" if A = [10, 2, 4, 15, 3, 6, 1] and "NO" if A = [1, 17, 2, 45] (because number 3 is missing). Below is what I've done so far.
Any help on this will be truly appreciated. I'm writing program which ask, first , for the length of a list, followed by the inputting the elements in the list. I want the program to print 'YES' if A contains numbers 1, 2, 3 (all of them)in an arbitrary order and "NO" otherwise. For instance, the program should print "YES" if A = [10, 2, 4, 15, 3, 6, 1] and "NO" if A = [1, 17, 2, 45] (because number 3 is missing). Below is what I've done so far.
n=int(input("Please enter the list length ")) A=[10,11,71,17,27,28] for i in range (0,n): print("Entering element:", i) CurEl=int(input("Please enter the element")) A.append(CurEl)