Lesson 4 Quiz

Lesson 4 Quiz

6th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Programming Quiz 2024/2025

Programming Quiz 2024/2025

6th - 8th Grade

10 Qs

Проєкти з вікнами в Python

Проєкти з вікнами в Python

8th Grade

13 Qs

Графічний інтерфейс користувача на мові Python

Графічний інтерфейс користувача на мові Python

8th - 11th Grade

12 Qs

Flutter Intermediate

Flutter Intermediate

KG - Professional Development

10 Qs

Tkinter Python

Tkinter Python

6th - 11th Grade

10 Qs

Python модуль tkinter

Python модуль tkinter

7th - 10th Grade

11 Qs

Кнопки, написи, текстове поле

Кнопки, написи, текстове поле

8th Grade

13 Qs

Interfaces en Python

Interfaces en Python

12th Grade

10 Qs

Lesson 4 Quiz

Lesson 4 Quiz

Assessment

Quiz

Computers

6th - 12th Grade

Hard

Created by

Whizara Teacher

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of these options show incorrect syntax?

Import Tkinter

import tk

import tkinter

import tk as tkinter

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the use of the <widget>.config() method?

To modify the properties of the widget during program run

To create the widget

To delete the widget

To alter the text shown on the widget

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Predict the output for these lines of code.

>>> var = 5

>>> def Fun1():

>>> global var

>>> var += 21

>>> print('Variable inside the function:',var)

 

>>> Fun1()

>>> var += 4

>>> print('Variable outside the function:',var)

Error

Variable outside the function: 30

Variable inside the function: 30

Variable outside the function: 30

Variable inside the function: 26

Variable outside the function: 30

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Find the line number on which an error is present.

>>> import tkinter as tk # 1

>>> top = tk.Tk() # 2

>>> L1 = tk.Label(top,text = ('Arial',12)) # 3

>>> L1.pack() # 4

1

2

3

4

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What argument does playsound.playsound() accept?

A string argument that holds the path to the sound file

 A file handle that contains the sound file inside an open() function

No argument is required

An import statement

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

The methods, grid() and pack() can be used simultaneously to fit a widget to a GUI window.

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which of these properties can be used with a Button widget’?

padx

pady

bd

All the other options are correct

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?