What is the output when we execute list(“hello”)?
a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’].
b) [‘hello’].
c) [‘llo’].
d) [‘olleh’].

1 Answer

Answer :

a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’].

Related questions

Description : What is the output when following code is executed ? >>> str1 = 'hello' >>> str2 = ',' >>> str3 = 'world' >>> str1[-1:] a) olleh b) hello c) h d) o

Last Answer : b) hello

Description : Suppose list Example is [‘h’,’e’,’l’,’l’,’o’], what is len(list Example)? a) 5 b) 4 c) None d) Error

Last Answer : a) 5

Description : What will be the output of the following segment of the program? main( ) { char *s = “hello world”; int i = 7; printf(“%, *s”, i, s); } (A) Syntax error (B) hello w (C) hello (D) o world

Last Answer : Answer: Marks given to all

Description : What is the output when following code is executed ? >>>str1="helloworld" >>>str1[::-1] a) dlrowolleh b) hello c) world d) helloworld

Last Answer : a) dlrowolleh

Description : hat is the output when following code is executed ? >>>print r"\nhello" The output is a) a new line and hello b) \nhello c) the letter r and then hello d) error

Last Answer : d) error

Description : Preparedstatement Object in JDBC is used to execute ........................... queries. A) executable B) simple C) high level D) parameterized

Last Answer : D) parameterized

Description : Prepared Statement object in JDBC used to execute........... queries. A) Executable B) Simple C) High level D) Parameterized

Last Answer : D) Parameterized

Description : Which method will a web browser call on a new applet? A) main method B) destroy method C) execute method D) init method

Last Answer : D) init method

Description : How many times does the following code segment execute int x=1, y=10, z=1; do{y--; x++; y-=2; y=z; z++} while (y>1 && z

Last Answer : A) 1

Description : The command javac is used to A) debug a java program B) compile a java program C) interpret a java program D) execute a java program

Last Answer : B) compile a java program

Description : The type(s) of auto executing macros, in Microsoft word is/are A) Auto execute B) Auto macro C) Command macro D) All of the above

Last Answer : D) All of the above

Description : A process that execute only in main memory is referred to as ……………… and that allocated in disk is referred to a ……………. A) virtual memory, true memory B) virtual memory, real memory C) real memory, virtual memory D) imaginary memory, real memory

Last Answer : C) real memory, virtual memory

Description : .............. refers to a situation in which a process is ready to execute but is continuously denied access to a processor in deference to other processes. A) Synchronization B) Mutual Exclusion C) Dead lock D) Starvation

Last Answer : D) Starvation

Description : With ................ only one process can execute at a time; meanwhile all other process are waiting for the processer. With .............. more ... . A) Multiprocessing, Multiprogramming B) Multiprogramming, Uniprocessing C) Multiprogramming, Multiprocessing D) Uniprogramming, Multiprocessing

Last Answer : C) Multiprogramming, Multiprocessing

Description : .................. executes must frequently and makes the fine grained decision of which process to execute the next. A) Long-term scheduling B) Medium-term scheduling C) Short-term scheduling D) None of the above

Last Answer : C) Short-term scheduling

Description : A set of processors P1, P2, ......, Pk can execute in parallel if Bernstein's conditions are satisfied on a pair wise basis; that is  P1 || P2 || P3 || ..... || Pk if and only if: (A) Pi || Pj for all i ≠ j (B) Pi || Pj for all i = j+1 (C) Pi || Pj for all i ≤ j (D) Pi || Pj for all i ≥ j

Last Answer : (A) Pi || Pj for all i ≠ j Explanation: Bernstein's Condition: 1. If process Pi writes to a memory cell Mi, then no process Pj can read the cell Mi. 2. If process Pi read from a memory ... Mi. 3. If process Pi writes to a memory cell Mi, then no process Pj can write to the cell Mi.

Description : Debugger is a program that (A) allows to examine and modify the contents of registers (B) does not allow execution of a segment of program (C) allows to set breakpoints, execute a segment of program and display contents of register (D) All of the above

Last Answer : (C) allows to set breakpoints, execute a segment of program and display contents of register

Description : Consider a discrete memoryless channel and assume that H(x) is the amount of information per symbol at the input of the channel; H(y) is the amount of information per symbol at the output of the channel; H(x|y) is the amount of uncertainty ... (H(x) - H(x|y))]  p(x) (D) max H(x|y)  p(x)

Last Answer : (D) max H(x|y)   p(x)

Description : To remove string “hello” from list1, we use which command ? a) list1.remove(“hello”) b) list1.remove(hello) c) list1.removeAll(“hello”) d) list1.removeOne(“hello”)

Last Answer : d) list1.removeOne(“hello”)

Description : For a B-tree of height h and degree t, the total CPU time used to insert a node is (A) O(h log t) (B) O(t log h) (C) O(t2h) (D) O(th)

Last Answer : (D) O(th)

Description : You have to sort a list L, consisting of a sorted list followed by a few ‘random’ elements. Which of the following sorting method would be most suitable for such a task ? (A) Bubble sort (B) Selection sort (C) Quick sort (D) Insertion sort

Last Answer : (D) Insertion sort

Description : Consider an implementation of unsorted single linked list. Suppose it has its representation with a head and a tail pointer (i.e. pointers to the first and last nodes of the linked list). Given the ... the front node of the linked list. (D) Deletion of the last node of the linked list.

Last Answer : (D) Deletion of the last node of the linked list. 

Description : What will be the output? d = {"john":40, "peter":45} print(list(d.keys())) a) [“john”, “peter”]. b) [“john”:40, “peter”:45]. c) (“john”, “peter”) d) (“john”:40, “peter”:45)

Last Answer : a) [“john”, “peter”].

Description : Which of the following statement is not correct with reference to cron daemon in UNIX O.S? (A) The cron daemon is the standard tool for running commands on a predetermined schedule. (B) It starts ... command lines and the times at which they invoked. (D) Crontab for individual users are not stored.

Last Answer : (D) Crontab for individual users are not stored.

Description : Assertion :- At constant temp `0^(@)C` and 1 atm, the change `H_(2)O(s)rarr H_(2)O(l)Delta H` and `Delta E` both are zero. Reason :- During isothermal

Last Answer : Assertion :- At constant temp `0^(@)C` and 1 atm, the change `H_(2)O(s)rarr H_(2)O(l) ... Reason is False. D. If both Assertion & Reason are false.

Description : Which one of the following is correct pairing of a body part and the kind of muscle tissue that moves it? (a) Biceps of upper arm – S m o o t h m u s c l e fibres (b) Abdominal wall – Smooth muscle (c) Iris – Involuntary smooth muscle (d) Heart wall – Involuntary unstriated muscle

Last Answer : (b) Abdominal wall – Smooth muscle

Description : Can anyone please advise me how to calculate gross salary? Thank you in advance Michal

Last Answer : Need Answer

Description : The necessary steps carried out to perform the operation of accessing either memory or I/O Device, constitute a ___________________ a) fetch operation b) execute operation c) machine cycle

Last Answer : c) machine cycle

Description : Using the following thermochemical data. `C(S)+O_(2)(g)rarr CO_(2)(g), Delta H=94.0` Kcal `H_(2)(g)+1//2O_(2)(g)rarr H_(2)O(l), Delta H=-68.0` Kcal `C

Last Answer : Using the following thermochemical data. `C(S)+O_(2)(g)rarr CO_(2)(g), Delta H=94.0` Kcal `H_(2)(g)+1// ... .0` Kcal C. `-114.0` Kcal D. `+114.0` Kcal

Description : Given that - `2C(s)+2O_(2)(g)rarr 2CO_(2)(g) Delta H = -787 KJ` `H_(2)(g)+ 1//2O_(2)(g)rarr H_(2)O(l) Delta =-286 KJ` `C_(2)H_(2)(g)+(5)/(2)O_(2)(g)ra

Last Answer : Given that - `2C(s)+2O_(2)(g)rarr 2CO_(2)(g) Delta H = -787 KJ` `H_(2)(g)+ 1//2O_(2)(g)rarr H_(2) ... 1802` KJ B. `-1802` KJ C. `-800` KJ D. `+237` KJ

Description : What Mass Of Calcium Carbonate Is Needed For Complete Reaction With The HCl In 2HCl(aq) plus CaCO 3 (s) CaCl 2 (aq) plus H 2 O(l) plus CO 2 (g)?

Last Answer : Need answer

Description : Given below equation represents: H 2 (g) + O 2 (g)  H 2 O (l) (a) skeleton chemical reaction (b) skeletal chemical equation (c) chemical equation (d) none of the above

Last Answer : (b) skeletal chemical equation

Description : The cement, widely used in retaining walls, is (a) R.H.C (b) L.H.C (c) S.R.C. (d) O.P.C.

Last Answer : (b) L.H.C

Description : For cold weathering concreting the cement used is (a) O.P.C (b) R.H.C (c) L.H.C (d) None of these

Last Answer : (b) R.H.C

Description : What is the oxidation number of Cl in HClO (read: H - C - L - O)?

Last Answer : ANSWER: 1+ (accept 1)

Description : Which of the following pairs of compounds could NOT be used to create a buffer solution? Would it be: w) HCL and NaCl (read: H - C - L and N - A - C - L) x) HCN and NaCN (read: H - C - N and N - A - C - N) y) NH3 ... - H - 4 - C - L) z) HNO2 and NaNO2 (read: H - N - O -2 and N - A - N - O - 2)

Last Answer : ANSWER: W -- HCL AND NaCl (read: H - C - L and N - A - C - L) 

Description : Given the symbols A, B, C, D, E, F, G and H with the probabilities 1/30, 1/30, 1/30, 2/30, 3/30, 5/30, 5/30 and 12/30 respectively. The average Huffman code size in bits per symbol is: (A) 67/30 (B) 70/34 (C) 76/30 (D) 78/30

Last Answer : (C) 76/30

Description : In the following graph, discovery time stamps and finishing time stamps of Depth First Search (DFS) are shown as x/y where x is discovery time stamp and y is finishing time stamp.  It shows which of the following depth first forest? (A ... {a,b,e} {f,g} {c,d} {h} (D) {a,b,c,d} {e,f,g} {h}

Last Answer : Answer: A

Description : Which of the following commands is used to display the directory attributes rather than its contents? A. ls -l -d B. ls -l C. ls -x D. ls -F E. None of the above

Last Answer : A. ls -l -d

Description : Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3? A. chmod u+x emp[l-3] B. chmod 777 emp* C. chmod u+r ??? emp D. chmod 222 emp? E. None of the above

Last Answer : A. chmod u+x emp[l-3]

Description : The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is A. tee B. tr C. sort D. grep E. None of the above

Last Answer : A. tee

Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} b={4:"D",5:"E"} a.update(b) print(a) a) {1: ‘A’, 2: ‘B’, 3: ‘C’} b) Method update() doesn’t exist for dictionaries c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’} d) {4: ‘D’, 5: ‘E’}

Last Answer : c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}

Description : What is the output of the following? x = "abcdef" i = "i" while i in x: print(i, end=" ") a) no output b) i i i i i i … c) a b c d e f

Last Answer : a) no output

Description : What is the output of the following? x = "abcdef" while i in x: print(i, end=" ") a) a b c d e f b) abcdef c) i i i i i i … d) error

Last Answer : d) error

Description : The height of h(A) of a fuzzy set A is defined as h(A) = sup A(x)  xϵA Then the fuzzy set A is called normal when (A) h(A) = 0 (B) h(A) < 0 (C) h(A) = 1 (D) h(A) < 1

Last Answer : (C) h(A) = 1 

Description : If h* represents an estimate of the cost of getting from the current node N to the goal node and h represents actual cost of getting from current node to the goal node, then A* algorithm gives an optimal solution ... h* us equal to h (B) h* overestimates h (C) h* underestimates h (D) none of these

Last Answer : (C) h* underestimates h

Description : If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n ≤ m, the expected number of collisions involving a particular key K is (A) less than 1 (B) less than lg n (C) greater than 1 (D) greater than lg n

Last Answer : (A) less than 1

Description : Consider f(N) = g(N) + h(N) Where function g is a measure of the cost of getting from the start node to the current node N and h is an estimate of additional cost of getting from the current ... ? (A) A* algorithm (B) AO* algorithm (C) Greedy best first search algorithm (D) Iterative A* algorithm

Last Answer : (C) Greedy best first search algorithm

Description : Consider a hash table of size m=100 and the hash function h(k) = floor(m(kA mod 1)) for A = (√5 − 1)/2 = 0.618033. Compute the location to which the key k = 123456 is placed in hash table. (A) 77 (B) 82 (C) 88 (D) 89

Last Answer : (C) 88