Deck 1: Python Programming Concepts

Full screen (f)
exit full mode
Question
To read the entire remaining contents of the file as a string from a file object infile, we use ____________

A)infile.readall()
B)infile.read()
C)infile.readlines()
D)infile.read(all)
Use Space or
up arrow
down arrow
to flip the card.
Question
To access value in tuple, use the ________ bracket for slicing along with the index.

A)square
B)round
C)not necessary
D)triangle
Question
What is a variable defined inside a function referred to as?

A)static variable
B)global variable
C)local variable
D)automatic variable
Question
Which of the following is mathematical function?

A)power
B)sqrt
C)add
D)sub
Question
What is the output for the following code:
Languages = ["java", "c++", "python"]
For x in languages :
If x == "c++":
Continue
Print(x)

A)java
B)java python
C)java c++
Python
D)c++ python
Question
How many types of geometry manager classes?

A)three
B)two
C)four
D)one
Question
Which geometry manager organizes widgets in blocks before placing them in the parent widget.

A)position()
B)grid()
C)pack()
D)place()
Question
Through Which Geometry method we can organizes widgets in a table-like structure in the parent widget.

A)position()
B)grid()
C)pack()
D)place()
Question
_____variable is shared by all instances of a class

A)class
B)instance
C)gloabal
D)local
Question
Which one of these is floor division

A)/
B)//
C)%
D)none
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/10
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 1: Python Programming Concepts
1
To read the entire remaining contents of the file as a string from a file object infile, we use ____________

A)infile.readall()
B)infile.read()
C)infile.readlines()
D)infile.read(all)
infile.read()
2
To access value in tuple, use the ________ bracket for slicing along with the index.

A)square
B)round
C)not necessary
D)triangle
square
3
What is a variable defined inside a function referred to as?

A)static variable
B)global variable
C)local variable
D)automatic variable
local variable
4
Which of the following is mathematical function?

A)power
B)sqrt
C)add
D)sub
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
5
What is the output for the following code:
Languages = ["java", "c++", "python"]
For x in languages :
If x == "c++":
Continue
Print(x)

A)java
B)java python
C)java c++
Python
D)c++ python
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
6
How many types of geometry manager classes?

A)three
B)two
C)four
D)one
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
7
Which geometry manager organizes widgets in blocks before placing them in the parent widget.

A)position()
B)grid()
C)pack()
D)place()
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
8
Through Which Geometry method we can organizes widgets in a table-like structure in the parent widget.

A)position()
B)grid()
C)pack()
D)place()
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
9
_____variable is shared by all instances of a class

A)class
B)instance
C)gloabal
D)local
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
10
Which one of these is floor division

A)/
B)//
C)%
D)none
Unlock Deck
Unlock for access to all 10 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 10 flashcards in this deck.