Search Header Logo

Python and Algorithms

Authored by Willard Kaonga

Computers

12th Grade

Used 1+ times

Python and Algorithms
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the meaning of the following pseudocode statement

num <-- 23

num is decremented by 23.
num is compared to 23.
num is multiplied by 23.
num is assigned the value 23.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

convert the following pseudocode statement to a python program

OUTPUT "Welcome Fatima"

output('Welcome Fatima')
print('Welcome Fatima')
print('Hello Fatima')
echo 'Welcome Fatima'

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you indicate a comment in python

Use /* comment */ for comments in Python.
Use // to indicate a comment in Python.
Use -- to indicate a comment in Python.
Use # to indicate a comment in Python.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do we call the process of breaking down complex systems into subsystems that can easily be managed?

Abstraction

Integration
Decomposition
Aggregation

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between subroutine and a function

Subroutines are always faster than functions.
A function may not take any parameters, while a subroutine can.
Functions can only be used in object-oriented programming, while subroutines can be used in any programming paradigm.
A subroutine may not return a value, while a function always returns a value.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

which one of the following rules apply to python syntax?

Indentation is significant in Python syntax.
Variable names can start with a number.
All statements must end with a semicolon.
Whitespace is ignored in Python syntax.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Debug the following python program and state the output

name = "Noah"

age=int(input("how old are you"))

print("you name is ", name, " You are ", "age", "years old"

your name is Noah You are age years old
your name is Noah You are 25 years old

your name is noah You are age years old

your name is 25 You are Noah years old

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?