Search Header Logo

EXAM PREP ITS PYTHON DAY1

Authored by Rainusa Indo

Computers

Professional Development

Used 1+ times

EXAM PREP ITS PYTHON DAY1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Memanggil fungsi gross_salary() akan menghasilkan error sintaks.

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Memanggil fungsi gross_salary(pieces=500, pieces_rate=4) akan mengembalikan nilai 2000.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Review the following code segment

product = 2

n = 5

while (n != 0):

product *= n

print (product)

n = 1

if n == 3:

break

 

How many lines of output does the code print?

1

10

2

No Output

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

You develop a Python application for your company.

You want to add notes to your code so other team members will understand it.

What should you do?

Place the notes after // on any line.

Place the notes within <!-- and --> in any code segment.

Place the notes within /* and */ in any code segment

Place the notes after # on any line.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which code segment should you use at line 03?

while (index <= 10):

while (index < 10):

while index < 10:

while index <= 10:

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which code segment should you use at line 06?

if numbers[index] = 6:

if numbers[index] == 6:

if numbers(index) == 6:

if numbers(index) = 6:

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Review the following code:

 

x = "apples"

y = "oranges"

z = "bananas"

data = "{1} and {0} and {2}"

print(data.format(z, y, x))

 

What is the output of the print statement?

Bananas and Oranges and Apples

Apples and Oranges and Bananas

Oranges and Apples and Bananas

Apples and Bananas and Oranges

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?