Question
Based on the following python code, find out the expected correct output(s) from the options (i) to (iv)
tup=("Red","Blue","Green","Yellow")
for i in range(3):
print(tup[random.randrange(1,4,2)],end="#")
(i) Blue#Blue#Yellow#
(ii) Red#Green#Green#
(iii) Blue#Yellow#Green# (iv) Blue#Green#Yellow#

Answer

(i)

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

Differentiate between ftp and http.  
What will be the status of the following list after the First, Second and Third pass of the bubble sort method used for arranging the following elements in descending order ?

Note: Show the status of all the elements after each pass very clearly underlining the changes. 152, 104, -100, 604, 190, 204

What are the significant features of the pandas Library?
 WAP to input two numbers m and n. Then display first m multiples of n.
Distinguish between LAN and WAN.

Write SOL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii) which are based on the tables.

TABLE : CUSTOMERS

NO CNAME ADDRESS
101 Richa jain Delhi
101 Surbhi Sinha Chennai
103 Lisa Thomas Bangalore
104 Imran Ali Delhi
105 Roshan Singh Chennai

TABLE : TRANSACTION

TRNO CNO AMOUNT TYPE DOT
T001 101 1500 Credit 2017-11-23
T002 103 2000 Debit 2017-05-12
T003 102 3000 Credit 2017-06-10
T004 103 12000 Credit 2017-09-12
T004 101 1000 Debit 2017-09-05

(a) To display details of all transactions of TYPE Credit from Table TRANSACTION.
(b) To display the CNO and AMOUNT of all transactions done in the month September 2017 from the table TRANSACTION.
(c) To display the last date of transaction (DOT) from the table TRANSACTION for the customer having CNO as 103.
(d) To display all CNO,CNAME and DOT (date of transaction) of those CUSTOMERS from tables CUSTOMERS and TRANSACTION who have done transactions more than or equal to 2000.
(e) Select count(*), avg(amount) from transaction where dot>= ‘2017-06-01’;
(f) Select cno, count(*), max (amount) from transaction group by cno having count(*)> 1;
(g) Select cno, cname from customer where address not in (‘Delhi, ‘Bangalore’);
(h) Select distinct cno from transaction;

Differentiate between ftp and http. 
WAP in python to create the duplicate copy of the list.
Out of the following, which all comes under cyber crime? [Delhi 2015]

(a) Stealing away a brand new computer from a showroom.

(b) Getting in someone’s social networking account without his consent and posting pictures on his behalf to harass him.

(c) Secretly copying files from server of a call center and selling it to the other organization.

(d) Viewing sites on a internet browser.

Find the errors and rectify the script.