Search Header Logo

Tutorial 5 Quiz

Authored by Wongsathorn Tonkultorn

Computers

University

Used 1+ times

Tutorial 5 Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output for print(foo(10))?

'A'

'B'

'C'

Error!

None of the answers are correct

Answer explanation

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output of print(foo(2))?

"AAA"

"ACA"

"AAB"

Error!

None of the answers is correct

Answer explanation

Media Image

The correct output is "AA"

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is the output of print(foo())?

"CS1010E"

"CS10"

"CS1"

Error!

None of the answers is correct

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Media Image

What is printed for foo_print(x)?

"HEY"

"HI"

"HELLO"

Nothing

Error!

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

What is printed for foo_print(x)?

"HI"

"HELLO"

Nothing

Error!

Answer explanation

Media Image

print(y) uses the global value y = "HELLO" to print

6.

MULTIPLE CHOICE QUESTION

45 sec • 3 pts

Media Image

What is the output of hugs(5)?

"oxo"

"oxoxoxo"

"oxoxo"

"oxoxoxoxo"

Error!

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Media Image

What is the output of print(memorize("ABCD")?

"AABACADA"

"AABABCABCD"

"ABACBADCBA"

"ABACAD"

Huh?

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?