Principles of Programming Set 2

Principles of Programming Set 2

University

40 Qs

quiz-placeholder

Similar activities

2.3 Robust Programs

2.3 Robust Programs

9th Grade - University

40 Qs

Model test

Model test

University

40 Qs

2023-2024 HDL Prelim Exam

2023-2024 HDL Prelim Exam

University

43 Qs

Technical Quiz

Technical Quiz

University

40 Qs

IT Online Quiz Bowl

IT Online Quiz Bowl

University

35 Qs

Examen de prueba 4: Topic Wise Test-4: Exception Handling, F

Examen de prueba 4: Topic Wise Test-4: Exception Handling, F

University

40 Qs

AZ-400 Quiz

AZ-400 Quiz

University

35 Qs

System Monitoring Tools Quiz

System Monitoring Tools Quiz

12th Grade - University

40 Qs

Principles of Programming Set 2

Principles of Programming Set 2

Assessment

Quiz

Computers

University

Hard

Created by

DUC Class

Used 1+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the try...except block?
Import modules
Handle input
Manage exceptions
Define variables
Control indentation

Answer explanation

It prevents the program from crashing on errors.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which tool is used for structured technical writing?
PlantUML
Overleaf
VS Code
Postman
Swagger

Answer explanation

Overleaf is used for LaTeX documents.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(bool(1 and 0))?
True
False
Error
1

Answer explanation

1 and 0 results in 0, which is False.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a static method?
@method
staticmethod
@classmethod
@staticmethod
methoddef

Answer explanation

Decorator @staticmethod is used for static methods.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does JIT stand for in compiler design?
Jumping Intermediate Translation
Just In Time Compilation
Java Interpreter Technique
Jumbled Instruction Table
Java Implementation Tool

Answer explanation

JIT compiles hot code during execution to optimize performance.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

AOT compilation occurs at which point in the software lifecycle?
During runtime
Before execution
While debugging
After garbage collection
During interpretation

Answer explanation

AOT compiles code into machine instructions before running.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does __doc__ store?
Module name
Script status
Docstring content
Import paths
Variable values

Answer explanation

It holds the module’s documentation string.

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?