Welcome Back!
Please update your name:
First name and last initial, pronouns
Agenda
5:00 Welcome! attendance chat
5:05 Dr. Marjon Moulai
5:35 Break
5:45 Coding design challenge Phase 2 Design Exploration
6:00 Your great answers on Variables
6:15 Loops in codeHS.com
6:30 Office Hours
Attendance Question
Some norms for a pleasant video call:
Please answer in the chat:
How many days in a row could you eat pizza before you got sick of it?
Dr. Marjoun Moulai
Questions?
With neutrinos traveling so fast, how much energy do they have?
THANK YOU, Dr. Moulai!
BREAK!
Break!
Engineering Design Challenge
Code a tool to help others understand IceCube
What can be coded?
Data Visualization
Automated Computations
Graphics and Animations
Websites
Software
Video Games
Front End/UI
Mobile Apps
Computer Systems Engineer
Back End
Full Stack
Some options for what people
might want to learn about IceCube:
Your great ideas/what do you want to know?:
CT, CS, Coding
Lorem Ipsum
Lorem Ipsum
�
CODING
The development of instructions that a computer can utilize
COMPUTER SCIENCE
The study of computers and algorithmic processes
COMPUTATIONAL THINKING
Solving problems using computer science concepts
Computational Thinking:
Computational Thinking:
Designing a new tool
01
02
03
04
DESIGN COMMUNICATION
DESIGN OPTIMIZATION
PROBLEM DEFINITION
DESIGN EXPLORATION
Goal-setting
Are you a “coder”?
Reflect on your own (3 minutes):
Initial understanding of the Problem |
To make a communication tool to share something about IceCube |
Stakeholders (Who specifically do you hope will interact with your design?) | |
Physicists, parents of the interns, high schoolers and classmates, physics students, people in general. Physics teacher! | |
Criteria (Your design strives to do these more and more) | Constraints (Your design must do these to be successful) |
Design should:
Design could:
| Project-imposed:
Natural world-imposed:
|
PROBLEM EXPLORATION
Your ideas!
Idea: DOM simulator game to teach people how they really work and detect flavors Criteria met: Criteria not met: | Idea: Life of a neutrino (oscillations, formulas, etc.) User interactive story mode Criteria met: Criteria not met: | Idea: Manage a neutrino-detection research facility and determine if they’re neutrinos and what their origin is Criteria met: Audience Criteria not met: | Idea: Dynamic model to visualize what happens in IceCube better Criteria met: anyone Criteria not met: |
Idea: Program to copy data and save offline to see through a terminal. Menu to talk about IceCube w/ links to website Criteria met: Someone with less internet Criteria not met: | Idea: Interactive graph showing a randomized neutrino path that the DOMS react to Criteria met: Criteria not met: | Idea: PhET simulation for the detector (UC Boulder) Criteria met: Criteria not met: | Idea: App or website to show how neutrinos oscillate and work and show how they interact with the rest of the universe Criteria met: Criteria not met: |
Idea: Neutrino Oscillation game. Find them before they oscillate. Criteria met: New learners about it. Criteria not met: | Idea: Interactive map of IceCube Criteria met: Criteria not met: | Idea: Animation (interactive) stating why you should learn about it, importance, what it is, and why to learn about it. Criteria met: elem Criteria not met: | Idea: Criteria met: Criteria not met: |
Last week...
Variables in CodeHS.com!
Variables----things you can vary.
The definition of “Vary”:
More examples of variables
Variables----things you can vary.
NOT things you can VERY
Means “so much” or “a lot!”
“I love you very much!”
A class of objects with properties that can change.
Like, variables
What inspired you to learn how to program?
“Programming seems to embody all of the principles of problem solving, which I love doing. I love the challenging feel, and when a problem is posed, I first think of how I can use algorithmic thinking to solve it.”
“My main inspiration to programing is that it is used very heavily in STEM nowadays, it will enable me to be more innovative and have a larger toolbox of skills while solving problems in college and my future career and life.”
Why is it important to match a variable name throughout a program?
“Matching a variable throughout a program can make the programs more efficient and easier to write. They need to be consistent throughout the program so that there are no errors.”
Were any of the code.org variables Boolean?
“Not yet.”
“I do not think that any of the variables were Boolean. Since Boolean variable are true or false, and that was not displayed throughout the coding exercises.”
“Yes, when I would check my code when programing tracy the turtle, I would press the button to check my code and it would either tell me that I am wrong or right which is Boolean (true or false). It checked my code using a true or flase program that would look for key things that my code needs to complete the assignment.”
How do you think data types or variables will affect the way that you complete your challenge?
“Having the user interact with variable could be used but I can't say for sure.”
“Yes and no, systemic changes could go wrong and it sometimes it can’t be fix immediately, which would cause problems to the program. For example when the character don’t match, and it was systematic it wouldn’t be be fixed immediately compare to a user being the one fixing it.”
“These variables and data types could definitely affect the way I complete my challenge based on the simplicity or "complicatedness" of the game/simulation I want to create. I would have my user interact with variables throughout the game.”
“Data types can be used to store data more effectively so that they can be reused and manipulated. For example, inputs given by the user should trigger pre-programmed actions, but there may be multiple actions associated with the input. Furthermore, as data changes, either by direct input or implicitly, it would be substantially more difficult without a variable to refer to them by.”
Data Types | Definition | Example |
Integer (int) | a data type used to represent mathematical integers, a number that is not a fraction | int x = 31 - “x” is the name of the variable - 31 is the specific value that “x” represents |
Float & Double | float: any fraction or decimal double: any fraction or decimal with 15-digits of precision | float: 3.14 or ½ double: |
Char & String | char: one character string: more than one character, creating a sequence of characters | char: R string: iAMsad |
Boolean | a data type that has only 2 possible values: true or false | true: ∆ = ∆ false: ∆ ≠ © |
Variables are placeholders for data. In order for data to be stored, a variable is created by ‘declaring’ or stating what the specific data type is and the variable is then assigned a value.
Topic 2:�Loops & Recursions
You saw loops, now we’re going to learn what they’re doing in the code.
The loop is saying: do the blue commands until the condition “5” is met, then go on.
for i in range(5):
draw_square()
length = (length + 10)
Condition
Commands
A few other things needed for loops:
Interval
(How much to increase the count by for each cycle of the loop)
Initial condition
(what number to start the count on)
Condition
(When to stop doing the loop)
Command
(What you’re doing every loop)
Example: Brushing your teeth side-to-side for 2 minutes
for i in range(2):
move_brush(right)
move_brush(left)
Example: Brushing your teeth side-to-side for 2 minutes
Interval
(How much to increase the count by for each cycle of the loop)
Initial condition
(what number to start the count on)
Condition
(When to stop doing the loop)
Command
(What you’re doing every loop)
Start timing at 0 minutes, not at 1 minute or 45 seconds.
“i=0”
Every minute, increase the count by one minute
“i+= 1” or “i++ 1”
Go until you count 2 minutes.
“i < 2”
Command is back and forth.
“{move brush right
move brush left}”
“i” stands for “The count”
Example: Brushing your teeth side-to-side for 2 minutes
Interval i+= 1
(How much to increase the count by for each cycle of the loop)
Initial condition i=0
(what number to start the count on)
Condition i<2
(When to stop doing the loop)
Command
(What you’re doing every loop)
All together, the code is:
for i=0; i<2; i+= 1
{move brush right
move brush left}
“i” stands for “The count”
Example: Brushing your teeth side-to-side for 2 minutes
Interval i+= 1
(How much to increase the count by for each cycle of the loop)
Initial condition i=0
(what number to start the count on)
Condition i<2
(When to stop doing the loop)
Command
(What you’re doing every loop)
Often, the command is separated out:
for i=0; i<2; i+= 1 {
move brush right
move brush left
}
“i” stands for “The count”
Here’s a similar code in Java Script
for (var count = 0; count < 6; count++) {
draw_square();
length = (length + 10);
}
Here’s a similar code in Java Script
for (var count = 0; count < 6; count++) {
moveForward(50);
turnLeft(120);
}
Similar but a little different.
for (var count = 0; count < 3; count++) {
moveForward(50);
turnLeft(120);
}
We used, i+=1, “i increases by 1 each cycle.
They use, “count ++”, which means:
“the count increases positively.”
We used, i
They use, “var count” which means, “the variable count functions in the following ways”
Sometimes you might set the initial condition to something other than 0 if it makes sense
This week, work through the Module “3. Loops” and practice loops in CodeHS.com