Python Multiple Choice Quizs Question – Lists
Q 1. Suppose list1 is [1, 5, 9], what is sum(list1)?A. 1B. 15C. 9D. Error Show Answer Answer:-B. 15 Explanation Sum returns the sum of all elements in the list. Q 2. To shuffle the list(say list1) what function do we use?A. list1.shuffle()B. shuffle(list1)C. random.shuffle(list1)D. random.shuffleList(list1) Show Answer Answer:-C. random.shuffle(list1) Explanation Execute in the shell … Continue reading Python Multiple Choice Quizs Question – Lists
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed