Important Python Mcqs

Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?

(a) Error

(b) None

(c) 25

(d) 2Read

Answer:

(c) 25

Explanation:

-1 corresponds to the last index in the list. That’s why 25 is the right answer!

Related MCQs

The main method header is written as?

a. public static void main(string[] args) b. public static void Main(string[] args) c. public static void main(Strings[] args) d. public static void main(String[] args) Answer:

A Java variable is the name of a

a. data value stored in memory that can change its value but cannot change its type during the program’s execution b. data type stored in

Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?