A student notices similar patterns in different word problems. Which computational thinking pillar does this represent?
Scenario:
You are asked to test all the numbers from 1 through 20 to determine which ones are even. To do this, you create a step-by-step process:
Start with the number 1.
Divide the number by 2.
If the remainder is 0, label the number as even.
Move to the next number.
Repeat until you reach 20.
Question:
Which Computational Thinking strategy best describes this process?
Match the flowchart symbol with its meaning.
| Stavka koja se može prevući | arrow_right_alt | Odgovarajuć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 |
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.
What is the decimal value of binary 10110?
Convert binary number 11100 to decimal.
Convert decimal number 25 to binary.
How many states can a 6-bit sequence represent?
Why was Unicode created after ASCII?
Which CAN be represented in ASCII?
Scenario:
You want to send a text message to a friend in Spanish. Your message includes characters like á, ñ, ü.
Question:
Why is Unicode necessary when sending this message? (Select all that apply.)
Unicode is important in global communication because it allows computers to consistently represent and display characters from many different languages.
If you wanted to ensure that sensitive company data remains unreadable even if a laptop is stolen, which type of utility software would be most critical?
Why do computers require more precise instructions than humans when following a set of directions?
Grace Hopper's vision for programming languages was initially rejected because people believed computers could only do arithmetic. What does this historical example demonstrate about technological innovation?
If translators (compilers and interpreters) did not exist, what would be the primary consequence for modern software development?
Identify the syntax error in this code:
from time import sleep
print("Program starting...")
sleep(2)
print("Done!)In Python, what can a string contain?
Which of the following print statements is properly formatted with a string? Select all that apply.
When the code below is run, what will take place?
Which of the following indicates that your file has been saved as a Python file?
Which of the following is a comment?
What is the output of this code:
name="Garry"
name="Sam"
print(name)
In the context of variables, what does 'assignment' mean?
Which naming convention rule is violated in this variable name: 'my score'?
When you use the input() function in Python, what data type is always returned regardless of what the user enters?
Why does adding two input values together result in concatenation instead of mathematical addition?
What will happen when this code executes if a user enters 5 and 3?
num1 = input()
num2 = input()
result = num1 + num2
print(result)
What is the correct way to convert user input to an integer?
What does the int() casting function change the string "7" to?
What happens when a runtime error occurs in a Python program?
If you want to convert the string "3.14" to a decimal number, which function should you use?
What will be the order of operations in the following code?
num = 10 * 3 % 2 - 5
What is the value of num in the following code?
num = 5 ** 2 + 3
What is the value of num in the following code?
num = 18 % 7
What is the value of num in the following code?
num = 5 / 2 - 1
What will be the data type of num?
num = 5 // 2
What will be the data type of num?
num = 5 / 2
What will be the output(s) from the following code?
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!")
The following code has an error. How can you fix it?
age = input("What is your age?")
decades_old = age / 10
Which of the following best describe what arithmetic operators are in python?
Which of the following best describe what relational operators are in python?
How will you know when a logic error is occurring?
Which of the following situations would require the use of modulo?
Which of the following situations would require the use of integer division?
Which of the following logical expressions evaluate to True? (Select all that apply.)
Given:
a = 10
b = 3
c = "10"Which line of code will cause a variable-naming error?
1) total-score = 50
2) total_score = 50
3) _value1 = 10
4) student2 = "Ava"What does the following code print?
x = 3
y = 9
print(y % x == 0)Assume the user enters: 19
age = input("Age: ")
if int(age) >= 18:
print("Adult")
if int(age) < 18:
print("Minor")What is printed?
How many seconds pass before the final line prints?
from time import sleep
print("Start")
sleep(1)
if 5 > 2:
sleep(2)
print("Done")What will be the output of the following code if the user enters 5 when prompted?
x = input("Enter a number: ")
y = int(x) + 3
print("The result is " + x + y)