Python Programming Essentials Quiz

Python Programming Essentials Quiz

12th Grade

10 Qs

quiz-placeholder

Similar activities

CP M4 Repetition & Loops

CP M4 Repetition & Loops

9th - 12th Grade

15 Qs

Python quiz

Python quiz

10th Grade - Professional Development

10 Qs

Java Classes and Objects

Java Classes and Objects

12th Grade

14 Qs

Python Final Assessment

Python Final Assessment

4th - 12th Grade

10 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

Functions and Parameters Summative preview

Functions and Parameters Summative preview

9th - 12th Grade

10 Qs

PCEP Section 3B: list methods: append(), insert(), index()

PCEP Section 3B: list methods: append(), insert(), index()

12th Grade

15 Qs

Javascript Quiz 1

Javascript Quiz 1

10th - 12th Grade

9 Qs

Python Programming Essentials Quiz

Python Programming Essentials Quiz

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Regita Permata

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid variable name in Python?

1variable

_variable

variable-1

variable!

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the data type of the variable 'x' in the following code? x = 5.5

int

float

string

boolean

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? if x > 5: print('Hello') else: print('World')

Hello

World

Hello World

No output

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times will the following loop execute? for i in range(5): print(i)

0

1

4

5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to define a function in Python?

def myFunction()

function myFunction()

myFunction()

function myFunction:

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of x after executing the following code? def myFunction(x): x += 5 return x x = 10 myFunction(x)

5

10

15

20

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? def myFunction(x, y): return x + y print(myFunction(2, 3))

2

3

5

6

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?