DHS AP CSP Midterm Review

DHS AP CSP Midterm Review

9th - 12th Grade

100 Qs

quiz-placeholder

Similar activities

Chủ đề 1: CĂN BẢN VỀ CÔNG NGHỆ (GS6 _LV1_2024)

Chủ đề 1: CĂN BẢN VỀ CÔNG NGHỆ (GS6 _LV1_2024)

1st Grade - University

96 Qs

PTS INFORMATIKA 2023 - GENAP

PTS INFORMATIKA 2023 - GENAP

10th Grade

100 Qs

PRETEST EXCEL & SCRATCH

PRETEST EXCEL & SCRATCH

9th - 12th Grade

100 Qs

Ulangan Informatika Kelas 7 Sem 1

Ulangan Informatika Kelas 7 Sem 1

7th Grade - University

100 Qs

Latihan USP

Latihan USP

9th - 12th Grade

100 Qs

TECHNOPRENEUR

TECHNOPRENEUR

10th Grade

100 Qs

AWS Cloud Practitioner

AWS Cloud Practitioner

9th - 12th Grade

103 Qs

SK SPM F5 (All Chapters)

SK SPM F5 (All Chapters)

11th Grade

100 Qs

DHS AP CSP Midterm Review

DHS AP CSP Midterm Review

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Medium

Created by

Christopher Jones

Used 20+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

100 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function reads a line of user input as a string in Python?

input()
read()
scan()
gets()

Answer explanation

`input()` returns a string from standard input.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does `print('A', 'B')` output by default?

AB
A B
A, B
['A','B']

Answer explanation

Multiple arguments to print are space-separated.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a syntax error in Python?

print('hi')
x = 3
if True print('ok')
a_b = 1

Answer explanation

An `if` requires a colon and an indented block.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does `type(3.0)` return?

<class 'int'>
<class 'float'>
<class 'str'>
<class 'bool'>

Answer explanation

3.0 is a float.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a valid Python comment?

// comment
# comment
/* comment */
<!-- comment -->

Answer explanation

Python uses `#` for single-line comments.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is true about indentation in Python?

Optional for style only
Defines code blocks
Only required in functions
Only required in loops

Answer explanation

Indentation defines block structure in Python.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens with `print('5' + '6')`?

11
56
TypeError
None

Answer explanation

String concatenation yields '56'.

Create a free account and access millions of resources

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?