Python MCQ Questions and Answers Pdf - 1

Question: 1

The module which allows you to interface with the Windows operating system is

(A) getopt module

(B) sys module

(C) csv module

(D) os module

Ans: D

os module

Question: 2

What does the name contain?

(A) os module name

(B) python filename

(C) main( ) name

(D) C++ filename

Ans: B

python filename

Question: 3

_____ is an array holding the command line arguments of the program

(A) g++

(B) argv

(C) Opts

(D) Getopt

Ans: B

argv

Question: 4

MinGW allows to compile and execute C++ program dynamically through python program using

(A) c++

(B) g++

(C) a++

(D) x++

Ans: B

g++

Question: 5

The command to change directory is

(A) cd

(B) cc

(C) dc

(D) changed

Ans: A

cd

Question: 6

Which module helps to parse(split) command-line options and arguments?

(A) getopt

(B) argopt

(C) get

(D) putopt

Ans: A

getopt

Question: 7

The argument of long options in the getopt method is followed by

(A) ,

(B) =

(C) #

(D) :

Ans: B

=

Question: 8

Which operator is used to access the functions of an imported value?

(A) +

(B) *

(C) /

(D) .

Ans: D

.

Question: 9

_______ refers to a set of runtime header files used in compiling and linking the code of C, C++, Fortran to run on window os.

(A) MaxGW

(B) CountGW

(C) MinGW

(D) AvgGW

Ans: C

MinGW

Question: 10

Which one is a special variable which by default stores the name of the file?

(A) main

(B) get

(C) _name_

(D) none

Ans: C

_name_

Recent Articles
Trending Posts

REGISTER TO GET FREE UPDATES