Programming
Programming Concepts:
Terms:
Modulo - returns the remainder from a division (ex: 3 % 2 will return 1)
Strings - another useful data type that con contain letters, numbers, and symbolsComments - messages in the code that are not read by the computer, only for humans to see, encased by quotations. A comment that stretches over more than one line needs three quotations on either side.
Functions - one of the most basic methods in code, entered into the code by defining it
Editor - the area where you write your code
Apostrophes - these break the strings, so in Python code, we use a backslash to fix this Variable - stores piece of data and gives it a specific name
Boolean - a data type that can only have two values
White Space - used to structure code and properly indent with four spaces
Console - where the code results and/or error messages are shown
Exponents - the exponent sign (^) is not used, instead (**) is
Division - %
String methods:
1 len () = length / number of characters of a string
2. lower () = gets rid of all capitalization
3. upper () = capitalizes all letters
4. str () = changes non-strings into strings
Examples of string methods:
1. given parrot = "Norwegian Blue", len (parrot) = 14
2. "Norwegian Blue".lower () = "norwegian blue"
3. "norwegian blue".upper () = "NORWEGIAN BLUE"
4. str (2) = "2"
Terms:
Modulo - returns the remainder from a division (ex: 3 % 2 will return 1)
Strings - another useful data type that con contain letters, numbers, and symbolsComments - messages in the code that are not read by the computer, only for humans to see, encased by quotations. A comment that stretches over more than one line needs three quotations on either side.
Functions - one of the most basic methods in code, entered into the code by defining it
Editor - the area where you write your code
Apostrophes - these break the strings, so in Python code, we use a backslash to fix this Variable - stores piece of data and gives it a specific name
Boolean - a data type that can only have two values
White Space - used to structure code and properly indent with four spaces
Console - where the code results and/or error messages are shown
Exponents - the exponent sign (^) is not used, instead (**) is
Division - %
String methods:
1 len () = length / number of characters of a string
2. lower () = gets rid of all capitalization
3. upper () = capitalizes all letters
4. str () = changes non-strings into strings
Examples of string methods:
1. given parrot = "Norwegian Blue", len (parrot) = 14
2. "Norwegian Blue".lower () = "norwegian blue"
3. "norwegian blue".upper () = "NORWEGIAN BLUE"
4. str (2) = "2"
Breadboard
More Concepts :
Kirchoff's 1st Rule: "The total current out of a node equals the total current into the node."
Breadboards: vertical rows are connected in the outermost columns on both the left and right side; in the center columns, horizontal rows are connected
Resistors: poor conductors that reduce voltage
Series circuits: draws less electricity because each additional bulb is extra resistance. Voltage changes, but current remains the same throughout.
Parallel circuits: draws more electricity because as the number of bulbs increases, the resistance in turn goes down. Parallel circuits are independent, unless they're in series with another set of parallel circuits.
Voltage: power that electricity gives off, push/pull of electricity, pressure or Potential Energy difference
Kirchoff's 1st Rule: "The total current out of a node equals the total current into the node."
Breadboards: vertical rows are connected in the outermost columns on both the left and right side; in the center columns, horizontal rows are connected
Resistors: poor conductors that reduce voltage
Series circuits: draws less electricity because each additional bulb is extra resistance. Voltage changes, but current remains the same throughout.
Parallel circuits: draws more electricity because as the number of bulbs increases, the resistance in turn goes down. Parallel circuits are independent, unless they're in series with another set of parallel circuits.
Voltage: power that electricity gives off, push/pull of electricity, pressure or Potential Energy difference
Resistors
Resistor's Code:
First band: 1st digit
Second band: 2nd digit
Third band: number of zero's in the amount of resistance
Fourth band: tolerance
0 Black
1 Brown
2 Red
3 Orange
4 Yellow
5 Green
6 Blue
7 Violet
8 Gray
9 White
0.1 (+/- 5%) Gold
0.01 (+/- 10%) Silver
First band: 1st digit
Second band: 2nd digit
Third band: number of zero's in the amount of resistance
Fourth band: tolerance
0 Black
1 Brown
2 Red
3 Orange
4 Yellow
5 Green
6 Blue
7 Violet
8 Gray
9 White
0.1 (+/- 5%) Gold
0.01 (+/- 10%) Silver
Robotic Art
For this project we used Raspberry Pi programming to program this robot. We were able to program it to do what ever function we wished it to do and move around.
Reflection
For this unit, i found it incredibly dry and long. I did learn a few valuable things but nothing that really made me excited. Programming was probably one of the most boring things i have ever had to do in STEM, however i can see how it could be important in the future. It just took a lot more time and focus than other projects. It was also incredibly frustrating at times and got annoying due to its extreme pickiness. But the class was willing to help each other out which was very nice. Electronics was also very dry but i did have two good moments. One moment was the first time my partner and I successfully put together a circuit without any help or guidance. The second time was for our final and my partner and I had to redo our circuit four times before we successfully built the circuit. it was two very fulfilling moments. The last thing we did for this unit was to make a robot and program it to do whatever we pleased. We didnt get that far into the project till we had to stop but i learned more about programming. Overall, i thought this project was very dry and slow but had some perks to it.