Python Programming Quiz - 2

Python Programming Quiz - 2

12th Grade

15 Qs

quiz-placeholder

Similar activities

C Programming Control Statements

C Programming Control Statements

12th Grade

10 Qs

programming basic

programming basic

5th Grade - University

10 Qs

Arduino (leds, signs, on & off)

Arduino (leds, signs, on & off)

9th - 12th Grade

10 Qs

Basic to 3D Print

Basic to 3D Print

9th - 12th Grade

20 Qs

Unit I: Engineering Introduction

Unit I: Engineering Introduction

9th - 12th Grade

15 Qs

Arduino Robotics S2

Arduino Robotics S2

9th - 12th Grade

10 Qs

Quiz on Control Structures

Quiz on Control Structures

12th Grade

15 Qs

PRACTICE TEST ARDUINO

PRACTICE TEST ARDUINO

11th Grade - University

20 Qs

Python Programming Quiz - 2

Python Programming Quiz - 2

Assessment

Quiz

Engineering

12th Grade

Hard

Created by

Krishnesh G P

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct variable declaration in Python?

int x = 5

var x = 5

x = 5

declare x = 5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type is returned by the expression 3 + 2.5 in Python?

Integer

Float

String

Boolean

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used for exponentiation in Python?

^

**

%

//

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a mutable data type in Python?

String

Tuple

List

Integer

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? python Copy code a = 10 b = 20 a, b = b, a print(a, b)

10 10

10 20

20 10

20 20

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to create a conditional statement in Python?

if

for

while

switch

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? python Copy code x = 5 if x > 2: print("A") elif x > 4: print("B") else: print("C")

A

B

C

No output

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 Engineering