You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alex Broaddus edited this page Sep 24, 2018
·
7 revisions
Meeting 2 - 9/24/18
Controls Parts List
Pressure Sensor
Gyroscope
Camera
Thermometer
Accelerometer
Sonar/Lasers
Ethernet Tether
Raspberry Pi
Motors
Pump/Plunger
Power Cable
Motor Controllers
Linear Actuator (small)
Voltage Regulator
LED indicators
Quick Python Overview
# This is a comment! Comments start with a '#' symbol.x=5# This line creates a new variable called 'x' with a value of 5y=x*10# This line creates a new variable called 'y' with a value of 50 (because x = 5 and 5 * 10 = 50)defsay_hello():
print("Hello!")
say_hello()
# Console will output 'Hello!'defadd_two_numbers(a, b):
returna+bz=add_two_numbers(x, y)
# z will equal 55, because x = 5, y = 50, and the add_two_numbers method returns the sum of the two given variables# Loopsn=5whilen>0:
print(n)
n-=1# This will print out:# 5# 4# 3# 2# 1foriinrange(5):
print(i)
# This will print out:# 0# 1# 2# 3# 4