Google Apps Script (GAS)

Jedi Training Tasks

To prepare for your year in Physics, work through all the tutorials on this page and complete all 10 JEDI Training Tasks in a Google sheet with multiple tabs. You can submit your final work using the Submit button above.

Types of Variables

JEDI TASK #1 - Variable Manipulation

Follow through each video and try out all of the code for yourself in your own Google sheet.

Video Links

0:01 Intro to GAS

10:00 Number Variables

29:00 String Variables

45:25 Boolean Variables

46:55 Array Variables

1:01:44 Object Variables

Conditionals and Looping

Video Links

0:01 Conditionals

28:37 FOR Loops

45:14 JEDI TASK #2 - Dice_Roller()

54:29 JEDI TASK #3 - Coin_Toss()

1:03:10 JEDI TASK #4 - FizzBuzz()

1:11:25 JEDI TASK #5 - Fibonacci()

JEDI TASK #2 - Dice_Roller() 45:14

Write a function to roll a die 100 times and print to the log screen the value. Instead of printing 1-6 , print the words one-six instead.

JEDI TASK #3 - Coin_Toss() 54:29

Write a function to flip a coin 100 times and print to the log screen "Heads" or "Tails. Then print a line that records the number of heads and tails. "Heads: # Tails: #".

JEDI TASK #4 - FIZZBUZZ() 1:03:10

Print to the log a list of numbers from 1-100. If the number is divisible by 3 print "Fizz". If the number is divisible by 5 print "Buzz". If the number is divisible by both 3 and 5 print "FizzBuzz". Otherwise just print the number.

JEDI TASK #5 - FIBONACCI() 1:11:25

The Fibonacci number sequence looks like: 0,1,1,2,3,5,8,13,21,34,56...

The sequence starts with 0,1 and then you always add the two previous numbers to get the current one. Write a program to print out the Fibonacci sequence up to the 100th number.

Parameters & arguments

Video Links

0:02 Parameters and Arguments

1:34 Passing in one argument

5:53 Passing in two arguments

9:20 Passing in a range

16:50 Returning a list

22:30 JEDI TASK #6: Cylinder Vol. Calculator

25:44 JEDI TASK #7: Temperature Calculator

31:24 JEDI TASK #8: E-mailer

JEDI TASK #6- cylinder() 22:30

Write a function that accepts height and radius parameters and returns the volume of a cylinder.

JEDI TASK #7 - temp() 25:44

Write a function that accepts a temperature and a label (either F or C) and converts and then returns the temperature to the corresponding F or C.

JEDI TASK #8 - emailer() 31:24

Using two columns of first and last student names, write a function that will generate an e-mail address with last name and then first three letters of the first name and then ends with: "@urbandaleschools.com"

SpreadsheetApp

Video Links

2:52 Image Manipulation

7:28 SpreadsheetApp

17:50 Button Creation


JEDI TASK #9- Visual Dice Roller 24:45

Write a program that when a "Roll It!" button is clicked a visual representation of a die will be displayed.

Charts

Video Links

0:01 Implementing Charts

JEDI TASK #10- Slope-Intercept 12:58

Write a program where the user will enter a slope and a y-intercept and when the "Graph It!" button is clicked the graph will update.

Custom Menu

Video Links

JEDI PRETRIAL- Custom Menu

Before beginning on the Jedi Trials this year, first prepare your Spreadsheet with a welcome page, at least two more pages and a Custom Menu. Throughout the year you will just constantly update this Spreadsheet.