Search Header Logo

Python Quiz

Authored by Suryadev Shyamraj

Computers

University

Used 2+ times

Python Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the extension for a python file?

.stk

.ppt

.py

.ttx

Answer explanation

The extension for a python file is .py. This file extension is used to identify Python script files. It is commonly used for writing and executing Python programs. The other options, .stk, .ppt, and .ttx, are not the correct extensions for Python files. .stk is not a recognized file extension, .ppt is used for PowerPoint presentations, and .ttx is used for Trados TagEditor files. Therefore, the correct answer is .py.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When was python created?

1991

1881

9842

2023

Answer explanation

Python was created in 1991. It is a high-level programming language that emphasizes code readability and simplicity. The correct choice is 1991, which is when Python was first introduced. Python has since become one of the most popular programming languages due to its versatility and extensive libraries. It is widely used in various domains, including web development, data analysis, and artificial intelligence. Python's creation marked a significant milestone in the world of programming, and it continues to evolve and thrive today.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Who created python?

Guiden Von Rossem

Irene lennik

Google

Right brothers

Answer explanation

The question is asking about the creator of Python. The correct answer is Guiden Von Rossem. Python was created by Guiden Von Rossem, not Irene lennik, Google, or Right brothers. The explanation highlights the correct choice and does not mention the option number. It is mentioned that the question is about the creator of Python, not the query. The explanation is within the limit of 75 words.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

print ("Hello")

Error

Hello

Indentation error

Syntax error

Answer explanation

The given question is asking to print the string 'Hello'. The correct answer is 'Hello'. The explanation for this answer is that the print function is used to display the output on the console. In this case, the print function is used to display the string 'Hello'. Therefore, the correct answer is 'Hello'.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A = 4

B = 5

if A > B:

print ("L")

else:

print ("N")

#G

N

L

G

#

Answer explanation

The question asks for an answer explanation based on the given question, options, and answer. The question is: 'A = 4, B = 5. If A > B, print 'L', else print 'N'. The options are 'N', 'L', 'G', and '#'. The correct answer is 'N'. The explanation should not exceed 75 words. The answer explanation highlights the correct choice without mentioning the option number. Instead of saying 'query', it is referred to as 'question'.

6.

FILL IN THE BLANK QUESTION

1 min • 2 pts

print (" ABC _)

Answer explanation

The given question is asking to print the string ' ABC _'. The correct choice to achieve this is the option '"'. The option '"' is enclosed in double quotes, which is the correct syntax to print a string in Python. Therefore, the answer explanation is that to print the string ' ABC _', we can use the option '"' in the print statement. The given query has the question to print the string ' ABC _).

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

if A = B_

print ("hello")

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers