[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, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
Mathematics, 26.04.2021 21:40
Mathematics, 26.04.2021 21:40
English, 26.04.2021 21:40
English, 26.04.2021 21:40
English, 26.04.2021 21:40
Mathematics, 26.04.2021 21:40
Social Studies, 26.04.2021 21:40
Mathematics, 26.04.2021 21:40
Chemistry, 26.04.2021 21:40
Mathematics, 26.04.2021 21:40