Quiz - 2

Quiz - 2

Professional Development

9 Qs

quiz-placeholder

Similar activities

Python Test 5A

Python Test 5A

Professional Development

10 Qs

ABREDES - Devasc Python

ABREDES - Devasc Python

Professional Development

14 Qs

operators in python

operators in python

Professional Development

14 Qs

day8

day8

Professional Development

10 Qs

Var and if

Var and if

Professional Development

10 Qs

Fundamental Python

Fundamental Python

Professional Development

14 Qs

pyhthon condition statement

pyhthon condition statement

Professional Development

10 Qs

Python LIST

Python LIST

Professional Development

10 Qs

Quiz - 2

Quiz - 2

Assessment

Quiz

Professional Development

Professional Development

Hard

Created by

Phitron Team

FREE Resource

9 questions

Show all answers

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 

8.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image
  1. What will this code output?

Error

None

  1. True

  1. False

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Which of the following will throw an error?

  1. int("5.5")

  1. float("5.5")

  1. str(5.5)

  1. bool(5.5)