Quiznetik

Python | Set 1

1. To read the entire remaining contents of the file as a string from a file object infile, we use ____________

Correct : B. infile.read()

2. To access value in tuple, use the ________ bracket for slicing along with the index.

Correct : A. square

3. What is a variable defined inside a function referred to as?

Correct : C. local variable

4. Which of the following is mathematical function?

Correct : B. sqrt

5. What is the output for the following code: languages = ["java", "c++", "python"] for x in languages : if x == "c++": continue print(x)

Correct : B. java python

6. How many types of geometry manager classes?

Correct : A. three

7. Which geometry manager organizes widgets in blocks before placing them in the parent widget.

Correct : C. pack()

8. Through Which Geometry method we can organizes widgets in a table-like structure in the parent widget.

Correct : B. grid()

9. _____variable is shared by all instances of a class

Correct : A. class

10. Which one of these is floor division

Correct : B. //