Quiz - 2

Quiz - 2

Professional Development

9 Qs

quiz-placeholder

Similar activities

Day-4 IOAC - ML Python Assessment_12th-Feb-2023

Day-4 IOAC - ML Python Assessment_12th-Feb-2023

Professional Development

10 Qs

String and List

String and List

Professional Development

14 Qs

Nodejs: Error Handling

Nodejs: Error Handling

Professional Development

10 Qs

Talent Next Quiz-5

Talent Next Quiz-5

Professional Development

10 Qs

Python Looping

Python Looping

Professional Development

9 Qs

python file handling

python file handling

Professional Development

10 Qs

Python Test 3A

Python Test 3A

Professional Development

10 Qs

Python Test 4A

Python Test 4A

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)