0% found this document useful (0 votes)
13 views1 page

Knowledge Knockout - Answers

The document provides a series of annotations explaining the functionality of various lines of code in a program. Each annotation describes a specific action, such as importing modules, creating lists, and handling user input. The overall focus is on how the program interacts with the user and processes responses.

Uploaded by

Abdul Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Knowledge Knockout - Answers

The document provides a series of annotations explaining the functionality of various lines of code in a program. Each annotation describes a specific action, such as importing modules, creating lists, and handling user input. The overall focus is on how the program interacts with the user and processes responses.

Uploaded by

Abdul Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Knowledge Knockout Answers

# ANNOTATION 1 - WHAT DOES THE FOLLOWING LINE DO?

Answer: imports the random module.

# ANNOTATION 2 - WHAT DOES THE FOLLOWING LINE DO?

Answer: creates a new list called ‘questions’.

# ANNOTATION 3 - WHAT DOES THE FOLLOWING LINE DO?

Answer: creates a new list called ‘answers’.

# ANNOTATION 4 - WHAT DOES THE FOLLOWING LINE DO?

Answer: repeats the following code until user enters ‘stop’.

# ANNOTATION 5 - WHAT DOES THE FOLLOWING LINE DO?

Answer: picks a random question from the list.

# ANNOTATION 6 - WHAT DOES THE FOLLOWING LINE DO?

Answer: asks the user to enter a response.

# ANNOTATION 7 - WHAT DOES THE FOLLOWING LINE DO?

Answer: if response is ‘stop’ then print ‘Goodbye’ and end program.

# ANNOTATION 8 - WHAT DOES THE FOLLOWING LINE DO?

Answer: if response is correct the print ‘Correct!’, else print ‘Wrong!’.

visit twinkl.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy