• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 3 pages
Exam (elaborations)

Unit 4 CMU coding academy test

Document preview thumbnail
Preview 1 out of 3 pages

Unit 4 CMU coding academy test Which of the functions is called when z = 12? if (z 12): drawPolygon(z) elif (z == 12): sayHi() else: drawOval('yellow') a. drawOval b. sayHi c. drawPolygon d. None - Answer-b. Which of the following is true about if-elif-else statements? a. After using if, an elif can be added as an additional test. b. The bodies of multiple elif's can run. c. You can use an elif without an if. d. Code in an else body runs if all the tests before it were True. - Answer-a. Which of the following results in a call to onKeyPress? a. Pressing the 'b' key. b. Releasing the 'b' key. c. Calling onKeyRelease('b') in a test case. d. All of the above. - Answer-a. Which of the following is drawn when we press the 'h' key and then release it? def onKeyPress(key): if (key == 'h'): Circle(200, 200, 20, fill='green') def onKeyRelease(key): Star(100, 200, 30, 7, fill='red') a. A green circle and red star are drawn. b. A green circle is drawn. c. A red star is drawn. d. Nothing is drawn. - Answer-a. Which of the following is the correct way to bring a circle named c to the front of the canvas?


Document information

Uploaded on
March 13, 2024
Number of pages
3
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$8.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
2
Followers
0
Items
992
Last sold
1 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions

Whoops! We can’t load your doc right now. Try again or contact support.