From a5114dcbf8fd296ec0b56fbd84d14bf73a5e6e53 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 11 Sep 2019 19:39:42 -0700 Subject: [PATCH 01/15] add hello world to file g with '#' will be ignored, and an empty message aborts the commit. --- chapter_1_lesson_olivia_sagayaradj.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 chapter_1_lesson_olivia_sagayaradj.py diff --git a/chapter_1_lesson_olivia_sagayaradj.py b/chapter_1_lesson_olivia_sagayaradj.py new file mode 100644 index 0000000..8cde782 --- /dev/null +++ b/chapter_1_lesson_olivia_sagayaradj.py @@ -0,0 +1 @@ +print("hello world") From b628f4b7a7ba3921d767406fbedb7fe1aa42013b Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 18 Sep 2019 18:57:36 -0700 Subject: [PATCH 02/15] write training 1 --- chapter_1_lesson_olivia_sagayaradj.py | 52 ++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/chapter_1_lesson_olivia_sagayaradj.py b/chapter_1_lesson_olivia_sagayaradj.py index 8cde782..e8897f2 100644 --- a/chapter_1_lesson_olivia_sagayaradj.py +++ b/chapter_1_lesson_olivia_sagayaradj.py @@ -1 +1,51 @@ -print("hello world") +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} From 23d0ebc1ab746de039d6324afd28c76638de4fbd Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 18 Sep 2019 19:34:45 -0700 Subject: [PATCH 03/15] add dictionary --- chapter1.2-software-training.py | 88 +++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 chapter1.2-software-training.py diff --git a/chapter1.2-software-training.py b/chapter1.2-software-training.py new file mode 100644 index 0000000..9d59225 --- /dev/null +++ b/chapter1.2-software-training.py @@ -0,0 +1,88 @@ +robotics teams = { + '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 awas': + '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'}} +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'} \ No newline at end of file From fc6ff44143060643395e33c70b4e730a58d1f454 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Thu, 19 Sep 2019 20:55:16 -0700 Subject: [PATCH 04/15] fixed errors --- chapter1.2-software-training.py | 76 ++++++--------------------------- 1 file changed, 14 insertions(+), 62 deletions(-) diff --git a/chapter1.2-software-training.py b/chapter1.2-software-training.py index 9d59225..dcbe0a0 100644 --- a/chapter1.2-software-training.py +++ b/chapter1.2-software-training.py @@ -1,5 +1,5 @@ -robotics teams = { - 'team_1111'; { +robotics_teams = { + 'team_1111': { 'location': 'Edgewater Maryland USA', 'rookie year':2003, @@ -8,17 +8,17 @@ '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 awas': - 'Autonomous Award sponsored by Ford District, Chairmans Award Team Spirit Award sponsored by FCA Foundation'} - team_2222 = {'location': + '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': + 'competed in 2019':False}, + 'team_3333': {'location': 'Julesburg CO USA', 'rookie year':2010, - 'competed in 2019':False} - team_1678 = {'location': + 'competed in 2019':False}, + 'team_1678': {'location': 'Davis CA USA', 'rookie year':2005, 'competed in 2019':True, @@ -27,62 +27,14 @@ '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, + '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' + '2019 season awards': 'District Event Winner'}} -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'} \ No newline at end of file From f32542457f6ac377847739888eb2f17514c6d5b4 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 25 Sep 2019 18:58:23 -0700 Subject: [PATCH 05/15] Fix syntax error in line 2 --- chapter1.2-software-training.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chapter1.2-software-training.py b/chapter1.2-software-training.py index dcbe0a0..b43ffd2 100644 --- a/chapter1.2-software-training.py +++ b/chapter1.2-software-training.py @@ -1,6 +1,5 @@ robotics_teams = { - 'team_1111': { - 'location': + 'team_1111': {'location': 'Edgewater Maryland USA', 'rookie year':2003, 'competed in 2019':True, From 602cfb60dcca54dcfe15f115ce1329ce752f65c9 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Thu, 26 Sep 2019 19:57:51 -0700 Subject: [PATCH 06/15] fixed errors with team numbers --- chapter1.2-software-training.py | 60 ++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/chapter1.2-software-training.py b/chapter1.2-software-training.py index b43ffd2..ec2b623 100644 --- a/chapter1.2-software-training.py +++ b/chapter1.2-software-training.py @@ -1,39 +1,51 @@ robotics_teams = { - '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': + 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}, - 'team_3333': {'location': + 'rookie year': 2007, + 'competed in 2019': False + }, + 3333: { + 'location': 'Julesburg CO USA', - 'rookie year':2010, - 'competed in 2019':False}, - 'team_1678': {'location': + 'rookie year': 2010, + 'competed in 2019': False + }, + 1678: { + 'location': 'Davis CA USA', - 'rookie year':2005, - 'competed in 2019':True, + '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': + '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, + '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'}} + '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 From 63519f3b6f5b26f38fec05496aacf4a919d0e488 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Thu, 3 Oct 2019 20:20:04 -0700 Subject: [PATCH 07/15] made chapter 2 assignment --- chapter_2_lesson_sagayaradj.py | 85 ++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 chapter_2_lesson_sagayaradj.py diff --git a/chapter_2_lesson_sagayaradj.py b/chapter_2_lesson_sagayaradj.py new file mode 100644 index 0000000..ee2901b --- /dev/null +++ b/chapter_2_lesson_sagayaradj.py @@ -0,0 +1,85 @@ +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' + robotics_teams = { + int(): { + 'programing language': + '', + 'width':'', + 'length':'', + 'camera vision':'', + 'number of drivetrain motors':'', + + }} + if activity_choice == 'view': + activity_choice = True; + state_variable = 'view' + user_team_number_question = int(input('Type which the number of the team you would like to edit')) + user_team_section_question = int(input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.')) + print(robotics_teams[user_team_number_question][user_team_section_question]) + if user_team_number != int: + print("The input is not valid, please type an interger") + while user_team_number != int: + user_team_number_question = int(input('Type which the number of the team you would like to edit')) + user_team_section_question = int(input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.')) + print(robotics_teams[user_team_number_question][user_team_section_question]) + if activity_choice == 'remove': + robotics_team_number = [] + user_team_number_question = int(input('Type which the number of the team you would like to remove')) + print(robotics_teams[user_team_number_question]) + if user_team_number != int: + print("The input is not valid, please type an interger") + while robotics_team_number != int: + user_team_number_question = int(input('Type which the number of the team you would like to view')) + print(robotics_teams[user_team_number_question]) + if activity_choice == 'edit': + activity_choice = True; + state_variable = 'modify' + user_team_number_question = int(input('Type which the number of the team you would like to edit')) + user_team_section_question = int(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_number_question][user_team_section_question]) + if user_team_number != int: + print("The input is not valid, please type an interger") + while user_team_number != int: + user_team_number_question = int(input('Type which the number of the team you would like to edit')) + user_team_section_question = int(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_number_question][user_team_section_question]) + if activity_choice == 'return to menu': + activity_choice = True; + state_variable = 'menu' + if activity_choice == 'quit': + break + + + + + + + + + + + + + + + From bbaad76056bb7bed612b89602e4d93f2329d7333 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 16 Oct 2019 20:09:37 -0700 Subject: [PATCH 08/15] fixed errors --- chapter_3_lesson_sagayaradj.py | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 chapter_3_lesson_sagayaradj.py diff --git a/chapter_3_lesson_sagayaradj.py b/chapter_3_lesson_sagayaradj.py new file mode 100644 index 0000000..f1dd521 --- /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 addDictionaries +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' + addDictionaries() + 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 From 40bece5883404d747579a5586157e0c24a7b7348 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 16 Oct 2019 20:10:49 -0700 Subject: [PATCH 09/15] fixed errors --- chapter_1_lesson_sagayaradj.py | 51 +++++++++++++++++++++++++ chapter_2_lesson_sagayaradj.py | 70 ++++++++++++++++++++-------------- 2 files changed, 92 insertions(+), 29 deletions(-) create mode 100644 chapter_1_lesson_sagayaradj.py 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 index ee2901b..9b51e25 100644 --- a/chapter_2_lesson_sagayaradj.py +++ b/chapter_2_lesson_sagayaradj.py @@ -1,3 +1,33 @@ +# chapter_2_lesson_sagayaradj.py +def addDictionary(): + return ( + robotics_teams = { + int(): { + 'programing language': + '', + 'width':'', + 'length':'', + 'camera vision':'', + 'number of drivetrain motors':'', + }}) +# chapter_2_lesson_sagayaradj.py +def viewDictionary(): + return ( + user_team_number_question = int(input('Type which the number of the team you would like to edit')) + user_team_section_question = input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.') + print(robotics_teams[user_team_number_question][user_team_section_question])) +# chapter_2_lesson_sagayaradj.py +def removeDictionary(): + return ( + robotics_team_number = [] + user_team_number_question = int(input('Type which the number of the team you would like to remove')) + print(robotics_teams[user_team_number_question])) +# chapter_2_lesson_sagayaradj.py +def editDictionary(): + return( + user_team_number_question = int(input('Type which the number 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_number_question][user_team_section_question])) robotics_teams = {} starting_sequence = False edited = False @@ -20,49 +50,31 @@ if activity_choice == 'add': activity_choice = True; state_variable = 'modify' - robotics_teams = { - int(): { - 'programing language': - '', - 'width':'', - 'length':'', - 'camera vision':'', - 'number of drivetrain motors':'', - - }} + addDictionary() if activity_choice == 'view': activity_choice = True; state_variable = 'view' - user_team_number_question = int(input('Type which the number of the team you would like to edit')) - user_team_section_question = int(input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.')) - print(robotics_teams[user_team_number_question][user_team_section_question]) + viewDictionary() if user_team_number != int: print("The input is not valid, please type an interger") while user_team_number != int: - user_team_number_question = int(input('Type which the number of the team you would like to edit')) - user_team_section_question = int(input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.')) - print(robotics_teams[user_team_number_question][user_team_section_question]) + viewDictionary() if activity_choice == 'remove': - robotics_team_number = [] - user_team_number_question = int(input('Type which the number of the team you would like to remove')) - print(robotics_teams[user_team_number_question]) + 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: - user_team_number_question = int(input('Type which the number of the team you would like to view')) - print(robotics_teams[user_team_number_question]) + removeDictionary() if activity_choice == 'edit': activity_choice = True; - state_variable = 'modify' - user_team_number_question = int(input('Type which the number of the team you would like to edit')) - user_team_section_question = int(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_number_question][user_team_section_question]) + state_variable = 'edit' + editDictionary() if user_team_number != int: - print("The input is not valid, please type an interger") + print("The input is not valid, please tyxpe an interger") while user_team_number != int: - user_team_number_question = int(input('Type which the number of the team you would like to edit')) - user_team_section_question = int(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_number_question][user_team_section_question]) + editDictionary() if activity_choice == 'return to menu': activity_choice = True; state_variable = 'menu' From 322145318abaca13597a8e5ba657cdb29db8e9f1 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Thu, 24 Oct 2019 19:32:33 -0700 Subject: [PATCH 10/15] chapter 2 assignment --- chapter_2_lesson_sagayaradj.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/chapter_2_lesson_sagayaradj.py b/chapter_2_lesson_sagayaradj.py index 9b51e25..1dc2e5c 100644 --- a/chapter_2_lesson_sagayaradj.py +++ b/chapter_2_lesson_sagayaradj.py @@ -1,7 +1,7 @@ # chapter_2_lesson_sagayaradj.py def addDictionary(): return ( - robotics_teams = { + robotics_teams == { int(): { 'programing language': '', @@ -12,22 +12,19 @@ def addDictionary(): }}) # chapter_2_lesson_sagayaradj.py def viewDictionary(): - return ( - user_team_number_question = int(input('Type which the number of the team you would like to edit')) - user_team_section_question = input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.') - print(robotics_teams[user_team_number_question][user_team_section_question])) + user_team_number_question = int(input('Type which the number of the team you would like to edit')), + user_team_section_question = input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.'), + print(robotics_teams[user_team_number_question][user_team_section_question]) # chapter_2_lesson_sagayaradj.py def removeDictionary(): - return ( robotics_team_number = [] user_team_number_question = int(input('Type which the number of the team you would like to remove')) - print(robotics_teams[user_team_number_question])) + print(robotics_teams[user_team_number_question]) # chapter_2_lesson_sagayaradj.py def editDictionary(): - return( user_team_number_question = int(input('Type which the number 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_number_question][user_team_section_question])) + print(robotics_teams[user_team_number_question][user_team_section_question]) robotics_teams = {} starting_sequence = False edited = False From eeaee2b04f73a7d7904eae5d2df23e7754af016d Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 30 Oct 2019 20:07:13 -0700 Subject: [PATCH 11/15] fixed errors --- chapter_3_lesson_sagayaradj.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter_3_lesson_sagayaradj.py b/chapter_3_lesson_sagayaradj.py index f1dd521..89107d3 100644 --- a/chapter_3_lesson_sagayaradj.py +++ b/chapter_3_lesson_sagayaradj.py @@ -18,7 +18,7 @@ if activity_choice == 'no': activity_choice = True; print("Great job. You are now finished") - state_variable = 'menu' + state_variable = 'menu' if activity_choice == 'yes': activity_choice = True; state_variable = 'modify' From 053e876c79ecd27c87787b9628f507f1c49305b4 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 30 Oct 2019 20:10:22 -0700 Subject: [PATCH 12/15] fixed errors --- chapter_2_lesson_sagayaradj.py | 48 +++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/chapter_2_lesson_sagayaradj.py b/chapter_2_lesson_sagayaradj.py index 1dc2e5c..32aba41 100644 --- a/chapter_2_lesson_sagayaradj.py +++ b/chapter_2_lesson_sagayaradj.py @@ -1,30 +1,36 @@ +teams = {} # chapter_2_lesson_sagayaradj.py def addDictionary(): - return ( - robotics_teams == { - int(): { - 'programing language': - '', - 'width':'', - 'length':'', - 'camera vision':'', - 'number of drivetrain motors':'', - }}) + 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_number_question = int(input('Type which the number of the team you would like to edit')), - user_team_section_question = input('Which information from this team would you like to access, programing language, width, length, camera vision, or number of drivetrain motors.'), - print(robotics_teams[user_team_number_question][user_team_section_question]) + 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(): - robotics_team_number = [] - user_team_number_question = int(input('Type which the number of the team you would like to remove')) - print(robotics_teams[user_team_number_question]) + 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_number_question = int(input('Type which the number 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_number_question][user_team_section_question]) + 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 @@ -47,7 +53,7 @@ def editDictionary(): if activity_choice == 'add': activity_choice = True; state_variable = 'modify' - addDictionary() + addDictionary(); if activity_choice == 'view': activity_choice = True; state_variable = 'view' @@ -69,7 +75,7 @@ def editDictionary(): state_variable = 'edit' editDictionary() if user_team_number != int: - print("The input is not valid, please tyxpe an interger") + print("The input is not valid, please type an interger") while user_team_number != int: editDictionary() if activity_choice == 'return to menu': From 9295b031ef40ae9b9da8b1b9ab39a3365c2d9982 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Fri, 1 Nov 2019 20:05:55 -0700 Subject: [PATCH 13/15] fixed errors --- chapter_4_lesson_sagayaradj.py | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 chapter_4_lesson_sagayaradj.py diff --git a/chapter_4_lesson_sagayaradj.py b/chapter_4_lesson_sagayaradj.py new file mode 100644 index 0000000..678e63b --- /dev/null +++ b/chapter_4_lesson_sagayaradj.py @@ -0,0 +1,43 @@ +user_question_x = int(input('Type value for x.')) +user_question_y = int(input('Type value for y.')) +user_question_z = int(input('Type value for z.')) +class Point: + def __init__(self, x, y): + self.x = x + self.y = y + def distance(self, x, y): + import math + print(math.sqrt(self.x**2 + self.y**2)) +x = user_question_x +y = user_question_y +class Point_3D(Point): + def __init__(self, x, y, z): + Point.__init__(self, x, y, z) + self.z = z + def distance(self, x, y, z): + import math + print(math.sqrt(self.x**2 + self.y**2 + self.z**2)) +z = user_question_z +Point_3D.distance(user_question_x, user_question_y, user_question_z) +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") + + From 36e1772b70db6745aabd7acfea9edfa95a1868b7 Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Wed, 6 Nov 2019 20:27:55 -0800 Subject: [PATCH 14/15] fixed errors --- chapter_4_lesson_sagayaradj.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/chapter_4_lesson_sagayaradj.py b/chapter_4_lesson_sagayaradj.py index 678e63b..5a96770 100644 --- a/chapter_4_lesson_sagayaradj.py +++ b/chapter_4_lesson_sagayaradj.py @@ -1,24 +1,28 @@ -user_question_x = int(input('Type value for x.')) -user_question_y = int(input('Type value for y.')) -user_question_z = int(input('Type value for z.')) +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, x, y): + def distance(self): import math print(math.sqrt(self.x**2 + self.y**2)) -x = user_question_x -y = user_question_y +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): - Point.__init__(self, x, y, z) + super().__init__(x, y) self.z = z - def distance(self, x, y, z): + def distance_3D(self): import math print(math.sqrt(self.x**2 + self.y**2 + self.z**2)) -z = user_question_z -Point_3D.distance(user_question_x, user_question_y, user_question_z) +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': From fcc9fedf12de9fd042e5c056fc7d10f77435b73a Mon Sep 17 00:00:00 2001 From: Olivia Sagayaradj Date: Thu, 14 Nov 2019 20:11:25 -0800 Subject: [PATCH 15/15] fixed errors --- chapter_3_lesson_sagayaradj.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter_3_lesson_sagayaradj.py b/chapter_3_lesson_sagayaradj.py index 89107d3..5689497 100644 --- a/chapter_3_lesson_sagayaradj.py +++ b/chapter_3_lesson_sagayaradj.py @@ -2,7 +2,7 @@ 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 addDictionaries +from chapter_2_lesson_sagayaradj import addDictionary from chapter_2_lesson_sagayaradj import removeDictionary from chapter_2_lesson_sagayaradj import editDictionary robotics_teams = {} @@ -27,7 +27,7 @@ if activity_choice == 'add': activity_choice = True; state_variable = 'modify' - addDictionaries() + addDictionary() if activity_choice == 'view': activity_choice = True; state_variable = 'view'