Principles of Programming Set 8

Principles of Programming Set 8

University

40 Qs

quiz-placeholder

Similar activities

Operators in Python

Operators in Python

University

45 Qs

PRO 111 | PRELIM | 09112023

PRO 111 | PRELIM | 09112023

University

45 Qs

TLE/ICT 9 - Programming Q1 Mastery Test

TLE/ICT 9 - Programming Q1 Mastery Test

9th Grade - University

40 Qs

JavaScript Control Flow and Loops.

JavaScript Control Flow and Loops.

10th Grade - University

35 Qs

Data Visualization

Data Visualization

11th Grade - University

35 Qs

PL101 MIDTERM Long Quiz

PL101 MIDTERM Long Quiz

University

35 Qs

Python Quiz

Python Quiz

University

40 Qs

Python Dictionary,Tuple and set

Python Dictionary,Tuple and set

University

35 Qs

Principles of Programming Set 8

Principles of Programming Set 8

Assessment

Quiz

Computers

University

Medium

Created by

DUC Class

Used 1+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which Python function is used to take input from a user?
enter()
get()
read()
input()
scan()

Answer explanation

input() reads input from the user in Python.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a disadvantage of HLLs?
Low productivity
Hardware dependence
Less error checking
Slower performance than low-level code
Complex syntax

Answer explanation

High-level languages trade performance for ease of use.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to read input from the user?
input()
scan()
read()
get()
cin

Answer explanation

input() reads a string from the user.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an emulator in the context of terminals?
A virus scanner
A debugger
Software that mimics hardware behavior
A file organizer
A data extractor

Answer explanation

Terminal emulators simulate old terminals.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does x = {} create?
set
list
dict
tuple

Answer explanation

{} makes an empty dictionary.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why use a docstring instead of a normal comment?
It’s shorter
For debugging
It’s part of documentation
To import it
It's syntax-highlighted

Answer explanation

Docstrings are accessible via help().

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will this return? bool("")
True
False
""

Answer explanation

Empty strings are False in boolean context.

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?