Uni-5 Quiz

Uni-5 Quiz

Professional Development

10 Qs

quiz-placeholder

Similar activities

Python

Python

University - Professional Development

10 Qs

Day 2 C Programming quiz

Day 2 C Programming quiz

Professional Development

10 Qs

Java OOP

Java OOP

Professional Development

10 Qs

Python Training Day-3 Quiz-3

Python Training Day-3 Quiz-3

Professional Development

10 Qs

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Batch 1

Batch 1

Professional Development

10 Qs

Java Fundamentals

Java Fundamentals

Professional Development

11 Qs

Arrays & Strings using C

Arrays & Strings using C

Professional Development

15 Qs

Uni-5 Quiz

Uni-5 Quiz

Assessment

Quiz

Computers

Professional Development

Hard

Created by

Uzma Sulthana

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if an exception occurs in a try block?

A) The program stops

B) The except block executes

C) The program skips to finally

D) Both B and C

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are strings in Python?

A) Mutable sequences of characters

B) Immutable sequences of characters

C) Lists of characters

D) None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the enumerate() function help with?

A) Traversing strings with indices

B) Counting string elements

C) Splitting strings

D) Formatting strings

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will the following code output?

A) RuntimeError

B) ZeroDivisionError

C) Cannot divide by zero!

D) None of the above

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What does the finally block do in this code?

A) Closes the file

B) Executes regardless of exceptions

C) Skips if except executes

D) None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the following code output?

  • A) ell

  • B) hel

  • C) ello

  • D) None of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What does the following code output?

  • A) -1

  • B) 2

  • C) 3

  • D) None of the above

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?