EmSAT Achieve Exam  >  EmSAT Achieve Tests  >  Test: Starting with Python - 2 - EmSAT Achieve MCQ Download as PDF

Test: Starting with Python - 2 - EmSAT Achieve MCQ


Test Description

20 Questions MCQ Test - Test: Starting with Python - 2

Test: Starting with Python - 2 for EmSAT Achieve 2024 is part of EmSAT Achieve preparation. The Test: Starting with Python - 2 questions and answers have been prepared according to the EmSAT Achieve exam syllabus.The Test: Starting with Python - 2 MCQs are made for EmSAT Achieve 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Starting with Python - 2 below.
Solutions of Test: Starting with Python - 2 questions in English are available as part of our course for EmSAT Achieve & Test: Starting with Python - 2 solutions in Hindi for EmSAT Achieve course. Download more important topics, notes, lectures and mock test series for EmSAT Achieve Exam by signing up for free. Attempt Test: Starting with Python - 2 | 20 questions in 40 minutes | Mock test for EmSAT Achieve preparation | Free important questions MCQ to study for EmSAT Achieve Exam | Download free PDF with solutions
1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Starting with Python - 2 - Question 1

Which of the following is NOT a valid variable name in Python?

Detailed Solution for Test: Starting with Python - 2 - Question 1

Variable names cannot start with a number.

Test: Starting with Python - 2 - Question 2

What is the result of the expression 5 + 2 * 3?

Detailed Solution for Test: Starting with Python - 2 - Question 2

Acc. to BODMAS
5 + 2 * 3 = 5 + 6 = 11

Test: Starting with Python - 2 - Question 3

What is the output of int(5.8)?

Detailed Solution for Test: Starting with Python - 2 - Question 3

The int() function converts a floating-point number to an integer by truncating the decimal part.

Test: Starting with Python - 2 - Question 4

Which operator is used to concatenate two lists in Python?

Detailed Solution for Test: Starting with Python - 2 - Question 4

The + operator is used to concatenate two lists in Python.

Test: Starting with Python - 2 - Question 5

Which of the following is a valid way to take user input in Python?

Detailed Solution for Test: Starting with Python - 2 - Question 5

The input() function is used to take user input in Python.

Test: Starting with Python - 2 - Question 6

What is the output of print('Hello' + 'World')?

Detailed Solution for Test: Starting with Python - 2 - Question 6

The + operator concatenates two strings.

Test: Starting with Python - 2 - Question 7

What is the result of 10 % 3?

Detailed Solution for Test: Starting with Python - 2 - Question 7

The modulo operator % returns the remainder of the division.

Test: Starting with Python - 2 - Question 8

What is the output of print(len([1, 2, 3]))?

Detailed Solution for Test: Starting with Python - 2 - Question 8

The len() function returns the number of elements in a list.

Test: Starting with Python - 2 - Question 9

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

Detailed Solution for Test: Starting with Python - 2 - Question 9

Lists are mutable in Python, meaning they can be modified after creation.

Test: Starting with Python - 2 - Question 10

What is the output of print(2 ** 3)?

Detailed Solution for Test: Starting with Python - 2 - Question 10

The exponentiation operator ** raises the first number to the power of the second number.

Test: Starting with Python - 2 - Question 11

What is the output of the following code?
x = 5
y = 2
print(x % y)

Detailed Solution for Test: Starting with Python - 2 - Question 11

The modulo operator % returns the remainder of the division.

Test: Starting with Python - 2 - Question 12

What is the output of the following code?
x = 10
y = 3
print(x // y)

Detailed Solution for Test: Starting with Python - 2 - Question 12

The floor division operator // returns the integer part of the division.

Test: Starting with Python - 2 - Question 13

What is the output of the following code?
my_list = [1, 2, 3]
print(my_list * 2)

Detailed Solution for Test: Starting with Python - 2 - Question 13

The * operator duplicates the list elements.

Test: Starting with Python - 2 - Question 14

What is the output of the following code?
print("Hello " * 3)

Detailed Solution for Test: Starting with Python - 2 - Question 14

The * operator duplicates the string.

Test: Starting with Python - 2 - Question 15

What is the output of the following code?
print(10 / 3)

Detailed Solution for Test: Starting with Python - 2 - Question 15

The division operator / returns a float value by default.

Test: Starting with Python - 2 - Question 16

What is the output of the following code?
x = 5
y = 2
z = x + y
print(z)

Detailed Solution for Test: Starting with Python - 2 - Question 16

The code assigns the sum of x and y to z and then prints z.

Test: Starting with Python - 2 - Question 17

What is the output of the following code?
x = 10
y = 3
z = x / y
print(z)

Detailed Solution for Test: Starting with Python - 2 - Question 17

The division operator / returns a float value.

Test: Starting with Python - 2 - Question 18

What is the output of the following code?
my_list = [1, 2, 3]
my_list.append(4)
print(my_list)

Detailed Solution for Test: Starting with Python - 2 - Question 18

The append() method adds an element to the end of the list.

Test: Starting with Python - 2 - Question 19

What is the output of the following code?
my_list = [1, 2, 3]
my_list.extend([4, 5])
print(my_list)

Detailed Solution for Test: Starting with Python - 2 - Question 19

The extend() method adds multiple elements to the end of the list.

Test: Starting with Python - 2 - Question 20

What is the output of the following code?
x = 5
y = x
y = 2
print(x)

Detailed Solution for Test: Starting with Python - 2 - Question 20

The assignment y = x creates a new reference to the same object. Modifying y does not affect x.

Information about Test: Starting with Python - 2 Page
In this test you can find the Exam questions for Test: Starting with Python - 2 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Starting with Python - 2, EduRev gives you an ample number of Online tests for practice
Download as PDF
Download the FREE EduRev App
Track your progress, build streaks, highlight & save important lessons and more!