Search Header Logo

Principles of Programming Set 8

Authored by DUC Class

Computers

University

Used 1+ times

Principles of Programming Set 8
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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.

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?