diff --git a/chapter1.2-software-training.py b/chapter1.2-software-training.py new file mode 100644 index 0000000..ec2b623 --- /dev/null +++ b/chapter1.2-software-training.py @@ -0,0 +1,51 @@ +robotics_teams = { + 1111: { + 'location': + 'Edgewater Maryland USA', + 'rookie year': 2003, + 'competed in 2019':True, + 'competitions in 2019': + 'CHS District Bethesda MD Event sponsored by Bechtel , CHS District Ownings Mills MD Event sponsored by Leidos , FIRST Chesapeake District Champion', + 'location of 2019 competitions': + 'Bethesda MD 20817 USA , Owings Mills MD 21117 USA , Fairfax VA 22030 USA', + '2019 season awards': + 'Autonomous Award sponsored by Ford District, Chairmans Award Team Spirit Award sponsored by FCA Foundation'}, + 2222: { + 'location': + 'Tacoma WA USA', + 'rookie year': 2007, + 'competed in 2019': False + }, + 3333: { + 'location': + 'Julesburg CO USA', + 'rookie year': 2010, + 'competed in 2019': False + }, + 1678: { + 'location': + 'Davis CA USA', + 'rookie year': 2005, + 'competed in 2019': True, + 'competitions in 2019': + 'Central Valley Regional Sacramento Regional , Aerospace Valley Regional , Carver Division , Einstein Field Houston , RCC Qianjiang International Robotics Invitational , Chezy Champs', + 'location of 2019 competitions': + 'Fresno CA USA , Davis CA USA , Lancaster CA USA , Houston TX USA , Houston TX USA , Hangzhou Zhejiang China , San Jose CA USA', + '2019 season awards': + 'Regional Chairmans Award , Regional Winners ,FIRST Deans List Finalist Award Katie Stachowicz , Regional Winners , Industrial Design Award sponsored by General Motors , Regional Winners , Excellence in Engineering Award sponsored by Delphi , Championship Subdivision Winner , Entrepreneurship Award sponsored by Klieiner Perkins Caufield and Byers' + }, + 5555: { + 'location': + 'Warren Michigan USA', + 'rookie year': 2015, + 'competed in 2019': True, + 'competitions in 2019': + 'FIM District Center Line Event , FIM District Marysville Event', + 'location of 2019 competitions': + 'Center Line MI USA , Marysville MI USA', + '2019 season awards': + 'District Event Winner' + }} +choice_team_question = int(input('Out of the teams 5555, 1678, 3333, 2222, and 1111, type which team you would like to get information from.')) +choice_section_question = input('Which information from this team would you like to access, location, rookie year, competed in 2019, competitions in 2019, locations of competitions in 2019, or 2019 season awards.') +print(robotics_teams[choice_team_question][choice_section_question]) \ No newline at end of file diff --git a/chapter_1_lesson_olivia_sagayaradj.py b/chapter_1_lesson_olivia_sagayaradj.py new file mode 100644 index 0000000..e8897f2 --- /dev/null +++ b/chapter_1_lesson_olivia_sagayaradj.py @@ -0,0 +1,51 @@ +team_1111 = {'location': + Edgewater Maryland USA, + 'rookie year': + 2003, + 'competed in 2019': + True, + 'competitions in 2019': + CHS District Bethesda MD Event sponsored by Bechtel CHS District Ownings Mills MD Event sponsored by Leidos FIRST Chesapeake District Champion, + 'location of 2019 competitions': + Bethesda MD 20817 USA Owings Mills MD 21117 USA Fairfax VA 22030 USA, + '2019 season awards': + Autonomous Award sponsored by Ford District Chairmans Award Team Spirit Award sponsored by FCA Foundation} +team_2222 = {'location': + Tacoma WA USA, + 'rookie year': + 2007, + 'competed in 2019': + False} +team_3333 = {'location': + Julesburg CO USA, + 'rookie year': + 2010, + 'competed in 2019': + False} +team_1678 = {'location': + Davis CA USA, + 'rookie year': + 2005, + 'competed in 2019': + True, + 'competitions in 2019': + Central Valley Regional Sacramento Regional Aerospace Valley Regional Carver Division Einstein Field Houston RCC Qianjiang International Robotics Invitational Chezy Champs, + 'location of 2019 competitions': + Fresno CA USA Davis CA USA Lancaster CA USA Houston TX USA Houston TX USA Hangzhou Zhejiang China San Jose CA USA, + '2019 season awards': + Regional Chairmans Award Regional Winners + FIRST Deans List Finalist Award Katie Stachowicz Regional Winners Industrial Design Award sponsored by General Motors + Regional Winners Excellence in Engineering Award sponsored by Delphi + Championship Subdivision Winner Entrepreneurship Award sponsored by Klieiner Perkins Caufield and Byers} +team_5555 = {'location': + Warren Michigan USA + 'rookie year' + 2015, + 'competed in 2019': + True, + 'competitions in 2019': + FIM District Center Line Event FIM District Marysville Event, + 'location of 2019 competitions': + Center Line MI USA Marysville MI USA, + '2019 season awards' + District Event Winner} diff --git a/chapter_1_lesson_sagayaradj.py b/chapter_1_lesson_sagayaradj.py new file mode 100644 index 0000000..74f1b14 --- /dev/null +++ b/chapter_1_lesson_sagayaradj.py @@ -0,0 +1,51 @@ +# chapter_1_lesson_sagayaradj.py +def Dictionaries(): + return + (robotics_teams == { + 1111: { + 'location': + 'Edgewater Maryland USA', + 'rookie year': 2003, + 'competed in 2019':True, + 'competitions in 2019': + 'CHS District Bethesda MD Event sponsored by Bechtel , CHS District Ownings Mills MD Event sponsored by Leidos , FIRST Chesapeake District Champion', + 'location of 2019 competitions': + 'Bethesda MD 20817 USA , Owings Mills MD 21117 USA , Fairfax VA 22030 USA', + '2019 season awards': + 'Autonomous Award sponsored by Ford District, Chairmans Award Team Spirit Award sponsored by FCA Foundation'}, + 2222: { + 'location': + 'Tacoma WA USA', + 'rookie year': 2007, + 'competed in 2019': False + }, + 3333: { + 'location': + 'Julesburg CO USA', + 'rookie year': 2010, + 'competed in 2019': False + }, + 1678: { + 'location': + 'Davis CA USA', + 'rookie year': 2005, + 'competed in 2019': True, + 'competitions in 2019': + 'Central Valley Regional Sacramento Regional , Aerospace Valley Regional , Carver Division , Einstein Field Houston , RCC Qianjiang International Robotics Invitational , Chezy Champs', + 'location of 2019 competitions': + 'Fresno CA USA , Davis CA USA , Lancaster CA USA , Houston TX USA , Houston TX USA , Hangzhou Zhejiang China , San Jose CA USA', + '2019 season awards': + 'Regional Chairmans Award , Regional Winners ,FIRST Deans List Finalist Award Katie Stachowicz , Regional Winners , Industrial Design Award sponsored by General Motors , Regional Winners , Excellence in Engineering Award sponsored by Delphi , Championship Subdivision Winner , Entrepreneurship Award sponsored by Klieiner Perkins Caufield and Byers' + }, + 5555: { + 'location': + 'Warren Michigan USA', + 'rookie year': 2015, + 'competed in 2019': True, + 'competitions in 2019': + 'FIM District Center Line Event , FIM District Marysville Event', + 'location of 2019 competitions': + 'Center Line MI USA , Marysville MI USA', + '2019 season awards': + 'District Event Winner' + }}) \ No newline at end of file diff --git a/chapter_2_lesson_sagayaradj.py b/chapter_2_lesson_sagayaradj.py new file mode 100644 index 0000000..32aba41 --- /dev/null +++ b/chapter_2_lesson_sagayaradj.py @@ -0,0 +1,100 @@ +teams = {} +# chapter_2_lesson_sagayaradj.py +def addDictionary(): + robotics_teams = {} + user_team_name = input('what is the team name') + user_team_number = int(input('what is the team number')) + user_programing_language = input('what is the programing language') + user_width = int(input('what is the width')) + user_length = int(input('what is the lenght')) + user_camera_vision = input('what is the camera vision') + user_number_of_drivetrain_motors = int(input('what is the number of drivetrain motors')) + robotics_teams = { + "number": user_team_number, + "language": user_programing_language, + "width": user_width, + "length": user_length, + "camera vision": user_camera_vision, + "drivetrain motors": user_number_of_drivetrain_motors} + teams[user_team_name] = robotics_teams +# chapter_2_lesson_sagayaradj.py +def viewDictionary(): + user_team_name_question = int(input('Type which the name of the team you would like to view')), + user_team_section_question = input("Which information from this team would you like to access, 'programing language', 'width', 'length', 'camera vision', 'number of drivetrain motors'."), + print(robotics_teams[user_team_name_question][user_team_section_question]) +# chapter_2_lesson_sagayaradj.py +def removeDictionary(): + user_team_name_question = int(input('Type what is the name of the team you would like to remove')) + print(robotics_teams[user_team_name_question]) +# chapter_2_lesson_sagayaradj.py +def editDictionary(): + user_team_name_question = int(input('Type what is the name of the team you would like to edit')) + user_team_section_question = input("Which information from this team would you like to edit, 'programing language', 'width', 'length', 'camera vision', or 'number of drivetrain motors'") + print(robotics_teams[user_team_name_question][user_team_section_question]) +robotics_teams = {} +starting_sequence = False +edited = False +activity_choice = "" +while starting_sequence == False: + state_variable = 'menu'; + print("Main Menu") + if edited == False: + activity_choice = input("There is nothing saved. Would you like to add/edit/remove/view information, 'yes' or 'no'") + print("act: " + str(activity_choice)) + if activity_choice == 'no': + activity_choice = True; + print("Great job. You are now finished") + state_variable = 'menu' + if activity_choice == 'yes': + activity_choice = True; + state_variable = 'modify' + activity_choice = input("Would you like to 'add', 'edit', 'remove', or 'view' information") + print("act: " + str(activity_choice)) + if activity_choice == 'add': + activity_choice = True; + state_variable = 'modify' + addDictionary(); + if activity_choice == 'view': + activity_choice = True; + state_variable = 'view' + viewDictionary() + if user_team_number != int: + print("The input is not valid, please type an interger") + while user_team_number != int: + viewDictionary() + if activity_choice == 'remove': + activity_choice = True; + state_variable = 'edit' + removeDictionary() + if user_team_number != int: + print("The input is not valid, please type an interger") + while robotics_team_number != int: + removeDictionary() + if activity_choice == 'edit': + activity_choice = True; + state_variable = 'edit' + editDictionary() + if user_team_number != int: + print("The input is not valid, please type an interger") + while user_team_number != int: + editDictionary() + if activity_choice == 'return to menu': + activity_choice = True; + state_variable = 'menu' + if activity_choice == 'quit': + break + + + + + + + + + + + + + + + diff --git a/chapter_3_lesson_sagayaradj.py b/chapter_3_lesson_sagayaradj.py new file mode 100644 index 0000000..5689497 --- /dev/null +++ b/chapter_3_lesson_sagayaradj.py @@ -0,0 +1,59 @@ +# chapter_1_lesson_sagayaradj.py +from chapter_1_lesson_sagayaradj import robotics_teams +# chapter_2_lesson_sagayaradj.py +from chapter_2_lesson_sagayaradj import viewDictionary +from chapter_2_lesson_sagayaradj import addDictionary +from chapter_2_lesson_sagayaradj import removeDictionary +from chapter_2_lesson_sagayaradj import editDictionary +robotics_teams = {} +starting_sequence = False +edited = False +activity_choice = "" +while starting_sequence == False: + state_variable = 'menu'; + print("Main Menu") + if edited == False: + activity_choice = input("There is nothing saved. Would you like to add/edit/remove/view information, 'yes' or 'no'") + print("act: " + str(activity_choice)) + if activity_choice == 'no': + activity_choice = True; + print("Great job. You are now finished") + state_variable = 'menu' + if activity_choice == 'yes': + activity_choice = True; + state_variable = 'modify' + activity_choice = input("Would you like to 'add', 'edit', 'remove', or 'view' information") + print("act: " + str(activity_choice)) + if activity_choice == 'add': + activity_choice = True; + state_variable = 'modify' + addDictionary() + if activity_choice == 'view': + activity_choice = True; + state_variable = 'view' + viewDictionary() + if user_team_number != int: + print("The input is not valid, please type an interger") + while user_team_number != int: + viewDictionary() + if activity_choice == 'remove': + activity_choice = True; + state_variable = 'edit' + removeDictionary() + if user_team_number != int: + print("The input is not valid, please type an interger") + while robotics_team_number != int: + removeDictionary() + if activity_choice == 'edit': + activity_choice = True; + state_variable = 'edit' + editDictionary() + if user_team_number != int: + print("The input is not valid, please type an interger") + while user_team_number != int: + editDictionary() + if activity_choice == 'return to menu': + activity_choice = True; + state_variable = 'menu' + if activity_choice == 'quit': + break \ No newline at end of file diff --git a/chapter_4_lesson_sagayaradj.py b/chapter_4_lesson_sagayaradj.py new file mode 100644 index 0000000..5a96770 --- /dev/null +++ b/chapter_4_lesson_sagayaradj.py @@ -0,0 +1,47 @@ +user_question_x_point_x = int(input('Type value for x for point x.')) +user_question_y_point_x = int(input('Type value for y for point x.')) +user_question_x_point_y = int(input('Type value for x for point y.')) +user_question_y_point_y = int(input('Type value for y for point y.')) +user_question_x_point_z = int(input('Type value for x for point z.')) +user_question_y_point_z = int(input('Type value for y for point z.')) +user_question_z_point_z = int(input('Type value for z for point z.')) +class Point: + def __init__(self, x, y): + self.x = x + self.y = y + def distance(self): + import math + print(math.sqrt(self.x**2 + self.y**2)) +x = Point(user_question_x_point_x,user_question_y_point_x) +y = Point(user_question_x_point_y,user_question_y_point_y) +class Point_3D(Point): + def __init__(self, x, y, z): + super().__init__(x, y) + self.z = z + def distance_3D(self): + import math + print(math.sqrt(self.x**2 + self.y**2 + self.z**2)) +x = Point_3D(user_question_x_point_z,user_question_y_point_z,user_question_z_point_z) +x.distance_3D() +user_points_question = input("Which 2D point would you like to use to find the distance from the 3D point, 'x' or 'y'") +print("act: " + str(user_points_question)) +if user_points_question == 'x': + user_points_question = True; + def pointComparisons_x(): + if xz == True: + print("point x is greater than point z") + if x==z == True: + print("point x and point z are equal") +if user_points_question == 'y': + user_points_question = True; + def pointComparisons_y(): + if yz == True: + print("point y is greater than point z") + if y==z == True: + print("point y and point z are equal") + +