100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Unit 2 - Functions, mouse events & properties CA$10.49   Add to cart

Class notes

Unit 2 - Functions, mouse events & properties

 5 views  0 purchase

Course was done online during covid using CMU CS Academy with Vincent Massey Secondary School (VMSS)

Preview 1 out of 1  pages

  • September 15, 2024
  • 1
  • 2020/2021
  • Class notes
  • Ms. lauren omstead
  • Introduction to computer studies
  • Secondary school
  • 10th Grade
  • ICS2O
  • 2
All documents for this subject (7)
avatar-seller
studystar9touni
Unit 2 - Functions, Mouse Events, and Properties
Sunday, November 29, 2020 4:15 PM



Section 2.1 Functions:
Subsection 2.1.1 - Function basics:




Here is an example of a function:




When the code is run, it draws an orange square at (50,50,300,300) with a
black border
The same function, drawBigSquare, can draw an orange square or a green
square or really a square of any colour.
We can call the same function multiple times, here is an example:




This code calls drawBigStar(4, 'black') to draw a 4-sided black star, and
then it calls drawBigStar(5, 'gold') to draw a 5-sided gold star. So we see
both stars in the drawing.
Lesson 4 - Legal names:
Here are some rules for your function and parameter names:
- Names must start with letters, but then can include letters or numbers.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller studystar9touni. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for CA$10.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75632 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
CA$10.49
  • (0)
  Add to cart