Search Header Logo

Quiz - 2

Authored by Phitron Team

Professional Development

Professional Development

9 Questions

Quiz - 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following is a conditional statement in Python?

  1. print

  1. if

  1. while

  1. return

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What is the output of this code ? ( Ignore the indentation )

  2. if 0: 
        print("Zero is True") 
    else: 
        print("Zero is False")

  1. Zero is True

  1. Zero is False

  1. Error

  1. Nothing

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which statement is correct about if-else blocks?

  1. else can exist without if

  1. Both if and else are mandatory

  1. if can exist without else

  1. if must come after else

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

  1. Given the following code, what will be printed ?

A

B

C

  1. Error

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

  1. Which of the following is invalid?

if True: pass

if True: print("Yes")  

if False: print("No") else: print("Yes")

Media Image

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

  1. What does this code print ?

1

-1

0

None

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is typecasting in Python?

  1. Defining new data types

Checking the type of a variable

  1. Casting a variable to a function

  1. Converting one data type into another 

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?