Quiz on Data Types

Q.1] What will be the output of given input ?
List=[1,2,3,4]
list1= [a*10 for a in List]
list1
a] [1,2,3,4]
b] [10,20,30,40]
c] (1,2,3,4)
d] (10,20,30,40)

Q.2] What will be the output of given input ?
a=(‘one’, ‘two’, ‘three’)
del a[1]
a] (‘one’, ‘two’, ‘three’)
b] (‘one’ ‘three’)
c] (‘two’, ‘three’)
d] error

Q.3] What will be the output of given input ?
a={1,2,2,3,4,4,4}
a
a] [1,2,3,4]
b] (1,2,3,4)
c] {1,2,3,4}
d {1,2,2,3,4,4,4}

Q.4] What will be the output of given input ?
a={1,2,“abc”,[10,20]}
a
a] error
b] {1,2,“abc”,[10,20]}
c] [1,2,“abc”,[10,20]]
d] [1,2,“abc”,[10,20]

Q.5] What will be the output of given input ?
a={10,20,30,30}
b={10,30,40,50,50}
a] a|b
b] a.union(b)
c] Both of the above
d] None of the above

1 Like

The answers -

  1. B
  2. B
    3.C
    4.A
  3. B

1.b [10,20,30,40]
2.d error - quotes are in reverse order
3.c {1,2,3,4} - set must contain unique values
4.a error
5.c both of the above

1 Like

The Answer for the Above Quiz
1.B
2. B
3.C
4. B
5.C

Answers:
1.b
2.b
3.c
4.a
5.c

1 c
2 a
3 b
4 a
5 c
Answer of python

Hi… @rajmandal8877
Q.2 Ans d i.e error
Q.5 Ans c i.e. Both of the above

Hello… @venkatalakshmi.ists1
Correct answers.

1 Like

Hello… @kumarprasanth5588 Welcome to the community…
Are you not solved quiz ?

Hi… @prachitisoni8 Please try again to give answers for first three questions.

Hai simran.I sloved the quiz
And i posted the answers also.

@kumarprasanth5588 Among them some are wrong…It seems you copied the answers. Please try it.

I tried it by my own.
What should i do if it is wrong.? How can u say that it i have Copied ?

I mean that there are some questions answers are ‘error’. I said it seems…Please don’t get wrong. You tried it by your own then great and keep it up… :slightly_smiling_face: