subject

6.7 Code Practice Instructions
You should see a large block of code in the programming environment below. First, run this code to see what it does.

You should see that running this code generates a graphics window with five buttons, labeled "Happy", "Sad", "Angry", "Surprised" and "Emoticon". Each of these can be clicked on. The starter code for the Happy (face1), Sad (face2) and Emoticon (face5) faces are left empty below, and and the code for Angry (face3) and Surprised (face4) faces show completed emoticons when you click. You can click on the buttons to turn them on and also to switch between them.

There is a lot provided in the starter code below - functions, variables, and more. One thing you might notice is the word "global". We'll look at this term in more detail in the next lesson. For now, you don't need to know what this word does. In short, the word global is used whenever there is a variable in a program that appears both inside and outside of a function. Your code may not run as you expect it to without a global variable, so the keyword is used to indicate to the computer that the same variable should be used every time it appears in the program. For now, we are just drawing your attention to this keyword, but you will be dealing with it in more detail soon.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:40, lizzlegnz999
Respecting individual differencespre-test active2time remaining48: 47nina is exploring her gender identity and sexual orientationwhich best describes how the role of the media might influence nina during this time in her life? the media would her decide because television shows are always unbiased about gender issues and do notstereotypethe media could make things difficult for her because television sometimes portrays rigid ideas about gender roles. all forms of media will her decide because the media always portrays rigid ideas about gender roles. all forms of media will make things easy for her because the media always portrays open and fair ideas about gender roles.
Answers: 1
image
Computers and Technology, 22.06.2019 04:40, debo4965
Amain idea is supported, explained, or expanded on with a numbers b. a concluding statement c. details d. a topic sentence. im e paragraphs reset nex next
Answers: 2
image
Computers and Technology, 23.06.2019 00:00, puppylove899
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, jaueuxsn
Which component acts as a platform on which application software runs
Answers: 2
You know the right answer?
6.7 Code Practice Instructions
You should see a large block of code in the programming enviro...

Questions in other subjects:

Konu
Mathematics, 29.01.2021 21:20
Konu
Arts, 29.01.2021 21:20
Konu
Mathematics, 29.01.2021 21:20