Python and Algorithms

Python and Algorithms

12th Grade

15 Qs

quiz-placeholder

Similar activities

GCSE Computer Science - Programming Keywords

GCSE Computer Science - Programming Keywords

9th - 12th Grade

15 Qs

Exploring Python: Input and Output Essentials

Exploring Python: Input and Output Essentials

9th Grade - University

10 Qs

Python Quiz

Python Quiz

12th Grade

11 Qs

Python L1

Python L1

8th Grade - University

14 Qs

PCEP Section 1D: Choose operators (May 7th)

PCEP Section 1D: Choose operators (May 7th)

12th Grade

15 Qs

Operators and data types

Operators and data types

9th - 12th Grade

17 Qs

Variables

Variables

9th - 12th Grade

17 Qs

Test - Python básico II

Test - Python básico II

9th - 12th Grade

16 Qs

Python and Algorithms

Python and Algorithms

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Willard Kaonga

Used 1+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?