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:β
Answers: 1
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
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
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
3. Observe the following program and answer the questions that follow:
city= [ "DEL", "CHN", "KOL",...
Chemistry, 06.11.2020 02:40
History, 06.11.2020 02:40
Biology, 06.11.2020 02:40
Spanish, 06.11.2020 02:40
Mathematics, 06.11.2020 02:40
Mathematics, 06.11.2020 02:40