Computers and Technology
Computers and Technology, 22.02.2021 21:50, AM28

3. Observe the following program and answer the questions that follow: city= [ "DEL", "CHN", "KOL", "BOM", "BNG"]
for I in range(1.4):
Fly = random. randrange (0,2) + 1;
print( city[Fly).end=":")
(a) What is the minimum and maximum number of times the loop will execute?
(h) Find out, which line of output(s) out of (i) to (iv) will not be expected from the program?
#Output Options:
i. DEL: CHN: KOL: i. CHN: KOL: CHN:
iii. KOL: BOM : BNG: iv. KOL: CHN : KOL:​

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:00, sarahnd6907
Explain briefly why you cannot expect to find a previous version of every file with which you work.
Answers: 1
image
Computers and Technology, 22.06.2019 06:00, willowcollins3753
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
image
Computers and Technology, 23.06.2019 06:20, Ab20600
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
image
Computers and Technology, 23.06.2019 21:40, gaby06
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings. for each match, add one point to user_score. upon a mismatch, end the game. sample output with inputs: 'rrgbryybgy' 'rrgbbrybgy'
Answers: 3
Do you know the correct answer?
3. Observe the following program and answer the questions that follow: city= [ "DEL", "CHN", "KOL",...

Questions in other subjects:

Konu
Biology, 06.11.2020 02:40
Konu
Spanish, 06.11.2020 02:40
Konu
Mathematics, 06.11.2020 02:40