Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
+1 vote
84.4k views
in Information Technology by (45.7k points)
closed by

Cconsider two objects x and y. x is a list whereas y is a Series. Both have values 20, 40,90, 110. 

What will be the output of the following two statements considering that the above objects have been created already

a. print (x*2)

b. print(y*2)

Justify your answer.

1 Answer

+1 vote
by (44.9k points)
selected by
 
Best answer

(a). will give the output as:

[20,40,90,110,20,40,90,110]

(b). will give the output as:

Justification: In the first statement x represents a list so when a list is multiplied by a number, it is replicated that many number of times.

The second y represents a series. When a series is multiplied by a value, then each element of the series is multiplied by that number.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...