Principles of Programming Set 2

Principles of Programming Set 2

University

40 Qs

quiz-placeholder

Similar activities

OSG-Part8_316-360

OSG-Part8_316-360

University

45 Qs

[Q] Chapter 5 - System Software

[Q] Chapter 5 - System Software

University

41 Qs

Principles of Programming Set 7

Principles of Programming Set 7

University

40 Qs

Nerds quiz

Nerds quiz

University

40 Qs

AHJN: U5-System Software

AHJN: U5-System Software

12th Grade - University

42 Qs

Quiz IMK Pra UTS

Quiz IMK Pra UTS

University

40 Qs

CS Basics

CS Basics

4th Grade - University

35 Qs

Principles of Programming Set 5

Principles of Programming Set 5

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?