InterviewSolution
| 1. |
If u know any questions answers plz reply. .its urgent |
|
Answer» 1. String2. Dictionary3. False4. 'abcd'5. T(3)="March"6.{1:'sunday', 2:'monday',3:'tuesday', 4:'wednesday'}7. Datatypes whose values at the same memory location can be changed. Eg. Lists. 8. a) 10 152b) 2130101529. string="WELCOME" for S in range (0,8): if str[S]=="E": print (str[S]) else ; print "No"corrected:string="WELCOME" for S in range (0,8): if string[S]=="E": print (string[S]) else: print ("No")10.max(L)11. list() FUNCTION returns the array entered as a list. 12. Tuples are the immutable arrays.13. a="KV1AJMER"new=""for i in range(LEN(a)-1,-1,-1): new+= a[i]print (i)14. insert(): Inserts a value at a given index.append(): adds a value at the end of a list.extend() :Attaches two lists. 15. Dictionary is a mapping datatype used to store date in terms of key values pairs and is mutable.16. Packing in tuples is the process of storing the values in a tuple and then assigning those values other variables though tuples. And unpacking is the means of extracting that data back.17. a) hellohellohellob)kv1Ajmerc) JAIPURd)I*N*D*I*AE) 218.same as 17.19. a) d["f"]=80b) d["c"]=35c) del d['e']Explanation:3) The ASCII co DE value for "a" is greater than "A".5) You can't change values in tuples. |
|