1 of 28

Welcome Back!

Please update your name:

First name and last initial, pronouns

2 of 28

Agenda

5:00 Welcome! attendance question

5:05 Dr. Emre Yildizci

5:45 Break

5:55 Pygame! And other options for projects

6: 25 Celebrate the Badges!

6:30 Office Hours

3 of 28

Attendance Question

Some norms for a pleasant video call:

Please answer one at a time:

What is your favorite particle?

  • Mute your mic if you’re not talking (bottom left corner).
  • Use Zoom chat or raise your hand to ask questions

4 of 28

5 of 28

6 of 28

7 of 28

Dr. Emre Yildizci

8 of 28

Notes

Muons have a longer lifetime than tau particles (on the order of microseconds), and it doesn’t lose much energy. So, it’s very interesting for experiments.

Muon effects:

  • Bad effects - background seen
  • Good effects - can tell flavor

9 of 28

THANK YOU, Dr. Yildizci!

10 of 28

Break!

11 of 28

Engineering Design Challenge

Code a tool to help others understand IceCube

12 of 28

Designing a new tool

01

02

03

04

DESIGN COMMUNICATION

DESIGN OPTIMIZATION

PROBLEM DEFINITION

DESIGN EXPLORATION

13 of 28

Your great ideas!

14 of 28

Images!

15 of 28

User Interface

16 of 28

Graphic User Interface

17 of 28

GUIs in Python

Python GUI programming with Tkinter: https://realpython.com/python-gui-tkinter/

Examples for Pygame in replit:

Space visualization https://replit.com/join/cepgbdkgtl-kshirey2022

Building a game with Pygame and Replit https://docs.replit.com/tutorials/07-building-a-game-with-pygame

Embed a Repl.it https://docs.replit.com/hosting/embedding-repls

18 of 28

Examples in Repl.it

19 of 28

A whole game from scratch in Pygame

20 of 28

Last week you did “Week 5. Operators” in CodeHS.com

Variables Badge!

Grid World Badge!

21 of 28

Python Arithmetic Operators

22 of 28

Relational Operators

Operator

Description

Example

==

Checks if the values of two operands are equal or not, if yes then condition becomes true.

(A == B) is not true.

!=

Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.

(A != B) is true.

>

Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.

(A > B) is not true.

<

Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true.

(A < B) is true.

>=

(or ≥)

Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true.

(A >= B) is not true.

<=

(or ≤)

Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true.

(A <= B) is true.

23 of 28

24 of 28

Control Structures

25 of 28

Make Tracy do the following actions three times: go forward, change colors, and then turn around.

Pop quiz:

Write this as Python script

26 of 28

Pop quiz! What will this draw?

27 of 28

Pop Quiz!

28 of 28

To do this week:

CodeHS.com

Identify a starting place from a recent codehs.com assignment.

Design Challenge assignments

Research for useful Python tutorials. Add them to your line in the spreadsheet.