Python Button Logic Quiz

Python Button Logic Quiz

6th - 10th Grade

29 Qs

quiz-placeholder

Similar activities

Module 7 Motherboards 1

Module 7 Motherboards 1

9th - 12th Grade

25 Qs

2.3 Robust Programs

2.3 Robust Programs

9th - 11th Grade

25 Qs

HKI I TIN LOP 7

HKI I TIN LOP 7

6th - 8th Grade

28 Qs

TES DIAGNOSTIK TIK

TES DIAGNOSTIK TIK

9th Grade

25 Qs

Word Review-- test 2

Word Review-- test 2

9th - 12th Grade

24 Qs

PAT ROBOTIC Elektronika Dasar 2019-2020

PAT ROBOTIC Elektronika Dasar 2019-2020

KG - Professional Development

25 Qs

INF_X_BAB 1 dan BAB 2

INF_X_BAB 1 dan BAB 2

10th Grade

25 Qs

Hardware and Software Fundamentals

Hardware and Software Fundamentals

10th - 11th Grade

30 Qs

Python Button Logic Quiz

Python Button Logic Quiz

Assessment

Quiz

Computers

6th - 10th Grade

Practice Problem

Medium

Created by

Fadi Fadi

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

29 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code display when Button A is pressed?

if button_a.is_pressed():

display.show("A")

An icon

"A"

Nothing

"B"

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following correctly checks if Button B is pressed?

if button_b.press():

if button_b == True:

if button_b.is_pressed():

if button_b.pressed():

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if both Button A and Button B are pressed in the following code?

if button_a.is_pressed():

display.show("A")

elif button_b.is_pressed():

display.show("B")

"B" will be displayed

Nothing will be displayed

Both "A" and "B" will be displayed

"A" will be displayed

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code display if no buttons are pressed? if button_a.is_pressed(): display.show("A") elif button_b.is_pressed(): display.show("B") else: display.show("?")

"B"

"?"

Nothing

"A"

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which code snippet will display a happy icon if Button A is pressed?

if button_a.is_pressed(): display.show(Image.HAPPY)

if button_a.is_pressed() == True: display.show(Image.HAPPY)

if button_a.is_pressed(); display.show(Image.HAPPY)

if button_a.pressed(): display.show(Image.HAPPY)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code when Button B is pressed?

if button_a.is_pressed():

display.show("A")

else: display.show("B")

"A"

"B"

Nothing

"A" and "B"

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the Micro display when both buttons are pressed in this code?

if button_a.is_pressed():

display.show("A")

if button_b.is_pressed():

display.show("B")

"A"

"B"

Both "A" and "B" at the same time

"A" followed by "B"

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?