Preskoči na glavni sadržaj
Prijava
Sign up for FREE
arrow_back
Biblioteka

Review Quiz

star
star
star
star
star
Posljednje ažuriranje 6 months ago
24 questions
Unit 2 Test Questions
Obavezno
1
Obavezno
1
Obavezno
1
Unit 3 Test Questions
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Unit 4 Test Questions
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Obavezno
1
Unit 6 Test Questions
Obavezno
1
1
Obavezno
1
Obavezno
1
Obavezno
1
Final Section
1
1
1
Pitanje 1
1.

Match the flowchart symbol with its meaning.

Stavka koja se može prevućiarrow_right_altOdgovarajuća stavka
arrow_right_alt

Terminal (Start/End)

arrow_right_alt

Process

arrow_right_alt

Decision

arrow_right_alt

Input/Output

arrow_right_alt

Flow line

arrow_right_alt

Subroutine

Pitanje 2
2.

Scenario:

A simple program asks the user to choose heads or tails and enter their choice. The program then randomly generates either heads or tails. Next, the user’s choice is compared to the random result. If the two match, the program displays “You won”. If they do not match, the program displays “You lost.”

Select the correct flowchart from the options shown below that represents this program.

Pitanje 3
3.

What is the decimal value of binary 10110?

Pitanje 4
4.

If translators (compilers and interpreters) did not exist, what would be the primary consequence for modern software development?

Pitanje 5
5.

Identify the syntax error in this code:

from time import sleep

print("Program starting...")
sleep(2)
print("Done!)

Pitanje 6
6.

In Python, what can a string contain?

Pitanje 7
7.

Which of the following print statements is properly formatted with a string? Select all that apply.

Pitanje 8
8.

Which of the following indicates that your file has been saved as a Python file?

Pitanje 9
9.

Which of the following is a comment?

Pitanje 10
10.

What is the output of this code:

name="Garry"

name="Sam"

print(name)

Pitanje 11
11.

In the context of variables, what does 'assignment' mean?

Pitanje 12
12.

Which naming convention rule is violated in this variable name: 'my score'?

Pitanje 13
13.

When you use the input() function in Python, what data type is always returned regardless of what the user enters?

Pitanje 14
14.

Why does adding two input values together result in concatenation instead of mathematical addition?

Pitanje 15
15.

What will happen when this code executes if a user enters 5 and 3?

num1 = input()

num2 = input()

result = num1 + num2

print(result)

Pitanje 16
16.

What is the correct way to convert user input to an integer?

Pitanje 17
17.

What will be the order of operations in the following code?

num = 10 * 3 % 2 - 5

Pitanje 18
18.

What is the value of num in the following code?

num = 18 % 7

Pitanje 19
19.

What will be the data type of num?

num = 5 // 2

Pitanje 20
20.

What will be the output(s) from the following code? (Select all that apply)

friends = 8

family = 4

total_people = friends + family

if total_people >= 10:

print("too many people for the party")

if total_people < 5:

print("not enough people for the party")

if friends > 3:

print("You have a lot of friends!")

if family > 5:

print("You have a big family!")

Pitanje 21
21.

The following code has an error. How can you fix it?

age = input("What is your age?")

decades_old = age / 10

Pitanje 22
22.

Which line of code will cause a variable-naming error?

1) total-score = 50
2) total_score = 50
3) _value1 = 10
4) student2 = "Ava"

Pitanje 23
23.

What does the following code print?

x = 3
y = 9
print(y % x == 0)

Pitanje 24
24.

Assume the user enters: 19

age = input("Age: ")
if int(age) >= 18:
    print("Adult")
if int(age) < 18:
    print("Minor")

What is printed?