Search Header Logo

XI-A1 FLOW OF CONTROL G6

Authored by Pulkit 1292

Information Technology (IT)

11th Grade

XI-A1 FLOW OF CONTROL G6
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

21 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 1. What is the purpose of an elif clause in Python?

The elif clause is a synonym for the else clause.
The elif clause is used to terminate a loop.

To comment code

To make an alternate branch if the if condition is false

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 2. L = "45" → datatype of L?

boolean
string
float
integer

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function converts a string "123" into integer?

int('123')
list('123')
float('123')
str(123)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 4. x = 5

if x > 10:

print("A")

elif x > 3:

print("B")

else:

print("C")

B
A
C
D

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 5. What’s the difference between elif and else?

'elif' is used for loops, while 'else' is not.
The difference is that 'elif' checks an additional condition, while 'else' executes when no previous conditions are true.
'elif' can only be used once, but 'else' can be used multiple times.
'elif' is a synonym for 'else' and has no functional difference.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 6. Which of these keywords marks a null operation?

PASS

CONTINUE

BREAK

ELSE

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. 7. x = float(input())

    if (x == 1):

    print("Yes")

    elif (x >= 2):

    print("Maybe")

    else:

    print("No")

    IF USER INPUT 1.5 THEN WHAT WILL BE OUTPUT

YES

NO

MAYBE

NOTHING PRINTED

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?