Python Flashcards

1
Q

Which of the following is not the type of loop? a. Conditional
b. Counter
c. Compute

A

Compute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

String list or tuple are termed as
A-sequence,
B-function,
C-loop.

A

Sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Blank widget is used to create single line label or caption.
A- Label,
B- Button,
C- Entry

A

Label

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The blank statement can be used to unconditionally jump out of the loop.

A

Break

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Blank is the smaller part of GUI which provides better control to the user.
A Widget,
B Range,
C Continue

A

Widget

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or False, Sequence is a collection of elements.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

True or False, Grid method organizes the widget window in tabular column.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or false, the range is a predefined function of Python.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

True or False? Continue statement tells the program to skip the rest of the statement of current iteration of loop.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

True or False, Entry widget is used to create single line input box.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The blank loop is used to repeat a block of statements until there is no item in any sequence.

A

For

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The range function consists of three parameters.

A

Start
Stop
Step

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The blank loop in python is used to repeat a block of statements for given numbers of times until the given condition is false.

A

While

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When we use else with for loop, this structure is known as blank.

A

For else loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Blank widget is used to create action button for application.

A

Button ()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Differentiate between while-else loop and for-else loop.

A

WHILE ELSE LOOP The else block runs if the while loop finishes without a break. FOR ELSE LOOP The else block runs if the for loop completes all iterations without a break.

17
Q

Name three types of TKINTER Layout Management Method.

A

Pack
Grid
Place

18
Q

Explain BREAK statement and CONTINUE statement.

A

BREAK STATEMENT Stops the loop and moves on to the next part of the program. CONTINUE STATEMENT Skips to the next round of the loop, ignoring the rest of the current one.

19
Q

What is Widget? Give example.

A

A widget is a user interface element like a button or a text box. Example, a button in a window or an app is a widget.