Mastering Python Basics

Mastering Python Basics

12th Grade

15 Qs

quiz-placeholder

Similar activities

Quiz Pemrograman Arduino

Quiz Pemrograman Arduino

10th Grade - University

15 Qs

IT tutor

IT tutor

12th Grade

18 Qs

แข่งขันcodingม.ต้น

แข่งขันcodingม.ต้น

12th Grade - University

15 Qs

Тест по Циклам Python (Cycles2)

Тест по Циклам Python (Cycles2)

9th Grade - University

19 Qs

PDS - 3DS  - entrada do usuário com Python

PDS - 3DS - entrada do usuário com Python

12th Grade

10 Qs

Quiz tentang Google Colab

Quiz tentang Google Colab

10th Grade - University

20 Qs

Laravel Entry Assessment

Laravel Entry Assessment

12th Grade

14 Qs

Kiểm Tra Môn Tin Học 10

Kiểm Tra Môn Tin Học 10

10th Grade - University

17 Qs

Mastering Python Basics

Mastering Python Basics

Assessment

Quiz

Information Technology (IT)

12th Grade

Easy

Created by

Bhoomika Anand

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: if 5 > 3: print('Yes') else: print('No')?

Maybe

Yes

Definitely not

No

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you write a comment in Python?

Use '#' to write a comment in Python.

Use '/* comment */' to write a comment in Python.

Use '/*' to start a comment in Python.

Use '//' to write a comment in Python.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of 10 % 3?

0

3

10

1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used for logical AND in Python?

&&

and

||

&

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the if-else statement?

To create loops in programming.

To declare variables in a script.

To control the flow of execution based on a condition.

To define functions in a program.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the expression 2 ** 3?

4

9

8

6

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you check if two variables are equal in Python?

Use '=' to assign values to variables.

Check with '===' for strict equality.

Use '!=' to check for inequality.

Use '==' to check if two variables are equal.

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?

Discover more resources for Information Technology (IT)