Search Header Logo

Python Programming Quiz

Authored by Asst.Prof.,CSE Chennai

Other

KG

Used 1+ times

Python Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid Python variable name?

2variable

_variable

variable-name

for

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

x = 5

X = 10

print(x, X)

5 10

10 5

Error

55

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT a valid identifier in Python?

my_var

class

myVar123

var_2x

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

int x = 10;

x := 10

x = 10

10 = x

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a Python keyword?

print

input

break

none

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to print "Hello, Python!" in Python 3?

print "Hello, Python!"

print(Hello, Python!)

print("Hello, Python!")

echo "Hello, Python!"

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

print("Python", "is", "fun", sep="-")

Python-is-fun

Python is fun

Python-is-fun-

Pythonisfun

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?