AKTU Python Quiz -Programming 2nd Week Quiz Solution



AKTU ICT Academy Python Programming a practical Approach 2nd Week Quiz Solutions

Hey guys here are the solutions of AKTU ICT Academy Python quiz solutions for the first week. AKTU released noncredit courses for 2nd-year computer science students of B. Tech. The course code is KNC 301/KNC 302.


These answers are for all those who have confusion in the questions or they don’t want to submit wrong answers. Please attempt the quiz yourself before proceeding for the answers.

Disclaimer :- I don't claim for the 100% accuracy of the answers. I tried my level best to present the correct answers and I'm not responsible if any of the answer is incorrect.



[1] If list=[‘red’ , ‘blue’ , ‘green’ , ‘yellow’] , what will be the output of : list.pop() print (list) ?

(a): yellow
(b): red’, ‘blue’, ‘green’
(c): blue’, ‘green’, ‘yellow’
(d): error
Answer:(d) error

[2] If you want to use an item after you remove from what, which function should you use?

(a): del()
(b): not possible
(c): remove()
(d): pop()
Answer: (d) pop()

[3] If list=[‘suzuki’, ‘subaru’, ‘honda’, ‘maruti’] , what will be the output of print(list[3]), after running the function : list.sort(reverse=True) ?

(a): suzuki
(b): subaru
(c): honda
(d): maruti
Answer(c) honda

[4] Which statement is correct?

(a): sorted() method sorts the items in ascending order
(b): sorted() method maintains the sorted order of the items in the list
(c): Both A and B
(d): Neither A nor B
Answer: (b) sorted() method maintains the sorted order of the items in the list

[5] Which method is used to arrange the items in a list in ascending order?

(a): sort()
(b): arrange()
(c): sort(reverse=True)
(d): ascend()
Answer: (a) sort()

[6] What is used for performing a repetitive tasks in Python?

(a): Counters
(b): Lists
(c): Arrays
(d): Loops
Answer: (d) loops

[7] How is a line, or a group of lines related to the rest of the program?

(a): square brackets []
(b): indentation
(c): braces {}
(d): parentheses ()
Answer: (a) square brackets []

[8] What will be the output of the following code? students = {‘abhay’, ‘ananya’, ‘raj’} for student in students: print (student)

(a): abhay ananya raj
(b): Error
(c): ananya raj
(d): abhay raj
Answer: (a) abhay ananya raj

[9] What is the output of the following code? for value in range (1,5): print(value)

(a): Error
(b): 1 2 3 4 5
(c): 2 3 4 5
(d): 1 2 3 4
Answer: (d) 1 2 3 4

[10] If numbers=[1, 2, 3, 4, 5] , then how to get the largest value of this list?

(a): high(numbers)
(b): max(numbers)
(c): large(numbers)
(d): sum(numbers)
Answer: (b)  max(numbers)

[11] Which statement will give a correct result?

(a): for a in range(1,10):
print(“HI!”)

(b): for a in range(1,10):
print(“HI!”)

(c): for a in range(1,10): print(“HI!”)
(d): None of the above
Answer: (c) for a in range(1,10): print(“HI!”)

[12] What values will the following? for i in range(1,8): print(i)

(a): 1, 2, 3, 4, 5, 6, 7
(b): 1, 2, 3, 4, 5, 6, 7, 8
(c): 1, 8
(d): 2, 3, 4, 5, 6, 7, 8
Answer:(a) 1, 2, 3, 4, 5, 6, 7

[13] What should come in the blank if we want to print HI! 6 times? for i in range(_____): print(“HI!”)

(a): 1,5
(b): 1,6
(c): 5
(d): 1,7
Answer: (d) 1,7


[14] Which of the following is a valid singleton tuple?

(a): single=(1)
(b): single=1,
(c): single=()
(d): single=1
Answer:(b) 1,

[15] What will be the output of the following? names=’abhay’, ‘raj’, ‘mahesh’ first, second, third = names print(second)

(a): abhay, raj, mahesh
(b):abhay,
(c): raj
(d): mahesh
Answer(c) raj
SHARE If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
Newer Posts Newer Posts Older Posts Older Posts

More posts

2 comments

  1. Replies
    1. Which statement is correct?
      1.sorted() method sorts the items in ascending order
      2.sorted() method maintains the sorted order of the items in the list
      3.Both A and B
      4.Neither A nor B

      Delete

Sponsored Content