wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz 1

Total questions: 21

Worksheet time: 15mins

Name
Class
Date
1.

what is IPO?

a)

computer work

{ Input, Proses, Output }

b)

a process of coding that produces something

c)

quickly found applications outside of computer

d)

programming as a practical methodology in general systems

2.

what is variable?

a)

commands

b)

is a type data

c)

data storage

d)

string and integer

3.

How do you declare a variable based on user input?

a)

my_data = "allinpython"

b)

age = input{" How old are you ? "}

c)

input = food("what is your favorite food ? ")

d)

animals = input("what is your favorite animal ? ")

4.

which is an example of using strings

a)

Y = 1

print(Y)

b)

a = "Hello"
print(a)

c)

a = "red"

print( "my favorite color is " ,a)

d)

x = range(6)

print(x)

5.

which is an example of using float

a)

a = "Hello, World!"
print(len(a))

b)

x = 3+5j
y = 5j
z = -5j

c)

x = 35e3
y = 12E4
z = -87.7e100

d)

x = 1
y = 35656222554887711
z = -3255522

6.

which is an example of using integer

a)

x = 1
y = 35656222554887711
z = -3255522

b)

thislist = ["apple", "banana", "cherry"]

c)

x = 1.10
y = 1.0
z = -35.59

d)

x = 3+5j
y = 5j
z = -5j

7.

which is an example of a wrong variable name?

a)

MY_NAME = "variable"

b)

myname1 = "variable"

c)

my name = "variable"

d)

my_name = "variable"

8.

how to create output in python?

a)

x = "Sally"
print(x)

b)

a = 33
b = 200
if b > a:

c)

cars = ["Ford", "Volvo", "BMW"]

d)

x = cars[0]

9.

which one an example of an incorrect data type?

a)

string

b)

integer

c)

boolean

d)

math

10.

what is coding?

a)

code to command and create amazing things with technology

b)

a collection of strange characters put together and colorful

c)

something amazing at computer

d)

something that make us confuse

11.

what is looping?

a)

plan to solve a problem at coding

b)

choose conditional that true, if we have false it will repeat until true

c)

repeating a set of instructions multiple times

d)

Used for iterating as long as a certain condition is true.

12.

What is the use of the 'print' function in Python?

a)

print("Hello, World!")

b)

print(5 + 3)

c)

print("Python is fun!")

d)

print("I love coding")

13.

Explain the concept of 'if' statement in Python.

a)

if x > y:
    print("x is greater than y")

b)

if x < y:
    print("x is less than y")

c)

if x == y:
    print("x is equal to y")

d)

if x != y:
    print("x is not equal to y")

14.

What is the purpose of using 'len' function in Python?

a)

len("Hello, World!")

b)

len([1, 2, 3, 4, 5])

c)

len("Python")

d)

len((1, 2, 3))

15.

what is function at python?

a)

Functions help break down code into smaller, easier to understand parts

b)

Functions can be reused across programs, saving time and effort in writing code.

c)

Functions can be grouped based on their functionality, making it easier to test and debug code.

d)

A function is a program that cannot be repeated

16.

how to create a function?

a)

just need to call using the 'print()' syntax

b)

we need a declaration first using the 'def' syntax

c)

using syntax while true do:

d)

we need to create input first before we call the name of the function

17.

what is conditional statement?

a)

used to access the operating system, such as reading input from the keyboard

b)

execute different code blocks based on whether a certain condition is true or false

c)

conditional statement is a programming construct that allows you to make decisions

d)

helps break down code into smaller, easier to understand parts

18.

which one example of conditional statement in python?

a)

if age >= 18: print("You are eligible to vote.") else: print("You are not eligible to vote.")

b)

def add_numbers(a, b): return a + b print(add_numbers(10, 20))

c)

let number = 1; while (number <= 20) { if (number % 2 === 0) { console.log(number + " is even."); } number++; }

d)

fruits = ["apple", "banana", "orange"] for fruit in fruits: print(fruit.upper())

19.

What is the purpose of using 'for' loop in Python?

a)

Iterating over a sequence of elements

b)

Executing a block of code repeatedly

c)

Performing a specific action based on a condition

d)

Defining a function to be called later

20.

Explain the concept of 'elif' statement in Python.

a)

It is used to check for multiple conditions

b)

It is used to define a new function

c)

It is used to iterate over a sequence

d)

It is used to execute a block of code repeatedly

21.

What is the use of the 'input' function in Python?

a)

It is used to print output to the console

b)

It is used to take user input from the console

c)

It is used to define a new function

d)

It is used to iterate over a sequence