[Edhesive] 6.2 lesson practice [Questions shown with pictures]
Question 1
Examine the c...
Computers and Technology, 13.11.2020 17:40 cody1097
[Edhesive] 6.2 lesson practice [Questions shown with pictures]
Question 1
Examine the code below. When this program runs, what size will the text be when printed on the screen?
import simplegui
def draw(canvas):
for i in range (10):
canvas. draw_text("Hello", (10, 25 + 20*i), 20, "red")
frame = simplegui. create_frame("Testing", 400, 400)
frame. set_draw_handler(draw)
frame. start()
A. 10
B. 20 * i
C. 400
D. 20
Question 2
Examine the code below. When this program runs, how many times will the word "Hello" be printed?
import simplegui
def draw(canvas):
for i in range (10):
canvas. draw_text("Hello", (10, 25 + 20*I), 20, "red")
frame = simplegui. create_frame("Testing", 400, 400)
frame. set_draw_handler(draw)
frame. start()
A. 20
B. 1
C. 10
D. 9
Question 3
Examine the code below. When this program runs, what value of x will be output?
x = 3
for i in range(3):
x = x * 2
print(x)
A. 24
B. 3
C. 6
D. 12
Answers: 2
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
History, 08.10.2019 02:30
Biology, 08.10.2019 02:30
English, 08.10.2019 02:30
Mathematics, 08.10.2019 02:30
Mathematics, 08.10.2019 02:30
English, 08.10.2019 02:30
Mathematics, 08.10.2019 02:30
English, 08.10.2019 02:30
Physics, 08.10.2019 02:30