Python 101 Final Test

Python 101 Final Test

9th - 12th Grade

40 Qs

quiz-placeholder

Similar activities

Python set 2

Python set 2

9th - 12th Grade

42 Qs

AP CSP - Unit 4 Code.org Review

AP CSP - Unit 4 Code.org Review

9th - 12th Grade

44 Qs

HTML Intro Quiz 1

HTML Intro Quiz 1

9th Grade

40 Qs

Python Semester 1

Python Semester 1

1st - 10th Grade

41 Qs

Edx GCSE Python 02

Edx GCSE Python 02

12th Grade

40 Qs

AP Comp Sci Principles - Unit 4 Final Review

AP Comp Sci Principles - Unit 4 Final Review

9th - 12th Grade

40 Qs

KUIS DASAR PROGRAM KEAHLIAN TKJ KELAS 10 2024-2025

KUIS DASAR PROGRAM KEAHLIAN TKJ KELAS 10 2024-2025

10th Grade

37 Qs

GCSE Computer Science - 2.3: Producing Robust Programs

GCSE Computer Science - 2.3: Producing Robust Programs

9th - 11th Grade

40 Qs

Python 101 Final Test

Python 101 Final Test

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Erkingul Andakulova

Used 6+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following makes the character fire if there is an enemy ahead? Mark all that apply.

if enemy_in_sight() :

long_jump()

if not enemy_in_sight() :

fire()

if enemy_in_sight() :

fire()

if enemy_in_sight() :

forward()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which part of a conditional goes after the if keyword and before the colon?

  • The word “if”

  • The word “else”

  • The code to run


The condition

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When would you use an "if-else" statement over an "if" statement?

  • When you want to stop running code once the condition is false

When you want to run different code if a condition is false

  • When you want to run code and then check if the condition is true after


  • They have the exact same function


4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

The following pieces of code are the exact same in functionality.

  • True

False

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

If you wanted to run different code given different conditions, how would you do that?


  • Combine all the conditions in one condition using “or”


Use “elif” statements


  • Put everything in the “else” statement


  • Create two functions


6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When running this code, what will the character do if there is an enemy?

if not enemy_in_sight() :

fire()

  • fire

nothing

  • walk forward


  • jump

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output of this code?

  • hello

  • world

hello

world

  • goodbye

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?