WorksheetsAL-(S)
Total questions: 10
Worksheet time: 17mins
විධානාත්මක පරිගණක භාෂාවක් නොවන්නේ,
C
SQL
Python
Java
පහත හදුන්වන අතුරින් වලංගු වන්නේ,
_name
Age of sam
2k19
us$
x = ["apple", "banana", "cherry"]
මෙහි දත්ත ප්රරූපය වන්නේ,
list
tuple
dict
set
x = 1 # int
y = 2.8 # float
z = 1j # complex
ඉහත විචල්ය වල දත්ත ප්රරූපය ප්රතිදානය කිරීමට සුදුසු ශ්රිතය(function) වන්නේ,
(a)
mylist = ["apple", "banana", "cherry"]
print(mylist[-1])
මෙහි ප්රතිදානය වන්නේ,
cherry
banana
apple
error
thislist = ["van", "train", "bus","other"]
thislist[1:3] = ["corona"]
print(thislist)
error
['van', 'corona']
['van', ''train, 'corona', 'other']
['van', 'corona', 'other']
thislist = ["van", "train", "bus","other"]
thislist.insert(2, "corona")
print(thislist)
['van','corona', 'train', 'bus', 'other']
['van', 'train', 'corona', 'bus', 'other']
['van', 'train', 'corona', 'other','bus']
none of above
thistuple = ("apple",)
print(type(thistuple))
thistuple = ("apple")
print(type(thistuple))
(a)
Tuple එකක්,
වෙනස් කල හැකිය
list එකක් බවට පරිවර්තනය කල හැකිය
දත්ත අයිතම ඉවත් කල හැක
දත්ත අයිතම එකතු කල හැකිය
fruit = {"apple", "banana", "cherry"}
del fruit
print(fruit)
ප්රතිදානය විය හැක්කේ,
(a)
