Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Helloworld.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("Hello world")
Empty file added Homework#1
Empty file.
2 changes: 2 additions & 0 deletions Homework#1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Robots={'1678':{'Weight':'100','Height':'150','Length':'200'}'127':{'Weight':'250','Height':'300','Length':'350'}}
print(Robots['1678']['Weight'])
78 changes: 78 additions & 0 deletions ch-1_assign_lucca_braudagan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
teams = {
1678 : {
"team_name" : "Citrus Circuits",
"location" : "Davis, CA",
"rookie_year" : 2005,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"Central Valley Regional" : "Fresno, CA",
"Sacramento Regional" : "Davis, CA",
"Aerospace Valley Regional" : "Lancaster, CA",
"Carver Division" : "Houston, TX",
"Einstein Field" : "Houston, TX",
"RCC Qianjiang International Robotics Invitational" : "Hangzhou, Zhejiang, China",
"Chezy Champs" : "San Jose, CA"
},
"2019_season_awards" : [
"Regional Chairman's Award At Central Valley Regional",
"Regional Winners At Central Valley Regional",
"FIRST Dean's List Finalist Award",
"Regional Winners At Sacramento Regional",
"Industrial Design Award Sponsored By General Motors",
"Regional Winners At Aerospace Valley Regional",
"Excellence In Engineering Award Sponsered By Delphi",
"Championship Subdivision Winner In Carver Divison",
"Entrepreneurship Award Sponsored By Kleiner Perkins Caufield And Byers"]
},
4322 : {
"team_name" : "Clockwork Oranges",
"location" : "Orange, CA",
"rookie_year" : 2012,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"San Diego Regional Presented By Qualcomm" : "Del Mar, CA",
"Las Vegas Regional" : "Las Vegas, NV",
"Einstein Field" : "Houston, TX",
"Battleship Blast Monday" : "San Pedro, CA",
"Beach Blitz" : "Huntington Beach, CA"
},
"2019_season_awards" : [
"FIRST Dean's List Finalist Award",
"FIRST Dean's List Award"]
},
5458 : {
"team_name" : "Digital Minds",
"location" : "Woodland, CA",
"rookie_year" : 2015,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"Central Valley Regional" : "Fresno, CA",
"Sacramento Regional" : "Davis, CA"
},
"2019_season_awards" : "None"
},
1 : {
"team_name" : "The Juggernauts",
"location" : "Pontiac, MI",
"rookie_year" : 1997,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"FIM District Center Line Event" : "Center Line, MI",
"FIM District Troy Event" : "Troy, MI"
},
"2019_season_awards":"Imagery Award In Honor Of Jack Kamen"
},
7229 : {
"team_name" : "Electronic Eagles",
"location" : "Sacramento, CA",
"rookie_year" : 2018,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"Sacramento Regional" : "Davis, CA"
},
"2019_season_awards" : "None"
}
}
team_number = int (input("Team Number (options are '1', '1678', '4322', '5458', '7229'):"))
team_information = input("Category (options are 'team_name', 'location', 'rookie_year', 'competed_in_2019_season','2019_competition_names_and_locations', '2019_season_awards':")
print(teams[team_number][team_information])
78 changes: 78 additions & 0 deletions ch_1_assign_lucca_braudagan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
teams = {
1678 : {
"team_name" : "Citrus Circuits",
"location" : "Davis, CA",
"rookie_year" : 2005,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"Central Valley Regional" : "Fresno, CA",
"Sacramento Regional" : "Davis, CA",
"Aerospace Valley Regional" : "Lancaster, CA",
"Carver Division" : "Houston, TX",
"Einstein Field" : "Houston, TX",
"RCC Qianjiang International Robotics Invitational" : "Hangzhou, Zhejiang, China",
"Chezy Champs" : "San Jose, CA"
},
"2019_season_awards" : [
"Regional Chairman's Award At Central Valley Regional",
"Regional Winners At Central Valley Regional",
"FIRST Dean's List Finalist Award",
"Regional Winners At Sacramento Regional",
"Industrial Design Award Sponsored By General Motors",
"Regional Winners At Aerospace Valley Regional",
"Excellence In Engineering Award Sponsered By Delphi",
"Championship Subdivision Winner In Carver Divison",
"Entrepreneurship Award Sponsored By Kleiner Perkins Caufield And Byers"]
},
4322 : {
"team_name" : "Clockwork Oranges",
"location" : "Orange, CA",
"rookie_year" : 2012,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"San Diego Regional Presented By Qualcomm" : "Del Mar, CA",
"Las Vegas Regional" : "Las Vegas, NV",
"Einstein Field" : "Houston, TX",
"Battleship Blast Monday" : "San Pedro, CA",
"Beach Blitz" : "Huntington Beach, CA"
},
"2019_season_awards" : [
"FIRST Dean's List Finalist Award",
"FIRST Dean's List Award"]
},
5458 : {
"team_name" : "Digital Minds",
"location" : "Woodland, CA",
"rookie_year" : 2015,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"Central Valley Regional" : "Fresno, CA",
"Sacramento Regional" : "Davis, CA"
},
"2019_season_awards" : "None"
},
1 : {
"team_name" : "The Juggernauts",
"location" : "Pontiac, MI",
"rookie_year" : 1997,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"FIM District Center Line Event" : "Center Line, MI",
"FIM District Troy Event" : "Troy, MI"
},
"2019_season_awards":"Imagery Award In Honor Of Jack Kamen"
},
7229 : {
"team_name" : "Electronic Eagles",
"location" : "Sacramento, CA",
"rookie_year" : 2018,
"competed_in_2019_season" : True,
"2019_competition_names_and_locations" : {
"Sacramento Regional" : "Davis, CA"
},
"2019_season_awards" : "None"
}
}
team_number = int (input("Team Number (options are '1', '1678', '4322', '5458', '7229'):"))
team_information = input("Category (options are 'team_name', 'location', 'rookie_year', 'competed_in_2019_season','2019_competition_names_and_locations', '2019_season_awards':")
print(teams[team_number][team_information])
102 changes: 102 additions & 0 deletions ch_2_assign_lucca_braudagan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
def int_check(user_input):
while True:
if user_input.isdigit():
return(int(user_input))
else:
user_input = input("This is not a numeral value for your input. Try again. ")

def bool_check(user_input):
while True:
if user_input.upper() == "TRUE":
return(True)
elif user_input.upper() == "FALSE":
return(False)
else:
user_input = input("This is not a boolean value for your input. Try again. (Input 'True' or 'False') ")

teams = {}

while True:
initial_user_request = input("Choose from: 'add' 'view_or_modify' 'remove' 'search' 'list' ")
if initial_user_request == "add":
temp_team_dictionary = {}

team_number = input("What is your team's team number? ")
team_number = int_check(team_number)

temp_team_dictionary["team_name"] = input("What is your team's name? ")
temp_team_dictionary["robot_name"] = input("What is your robot's name? ")
temp_team_dictionary["robot_p_language"] = input("What is your robot's programming language? ")
robot_width = input("What is your robot's width? ")
temp_team_dictionary["robot_width"] = int_check(robot_width)
robot_height = input("What is your robot's height? ")
temp_team_dictionary["robot_height"] = int_check(robot_height)
robot_camera = input("Does your robot have a camera vision system? (Input 'True' or 'False') ")
temp_team_dictionary["robot_camera"] = bool_check(robot_camera)
robot_drivetrain = input("How many drivetrain motors does your robot have? ")
temp_team_dictionary["robot_drivetrain"] = int_check(robot_drivetrain)

teams[team_number] = temp_team_dictionary

elif initial_user_request == "view_or_modify":
team_view_uncheck = input("Which team would you like to view? ")
team_view = int_check(team_view_uncheck)

if team_view in teams:
information_category = input("What category would you like to view or modify? ")
integer_inputs = ["robot_width", "robot_height", "robot_drivetrain"]
if information_category in teams[team_view]:
if information_category in integer_inputs:
print(teams[team_view][information_category])
new_info_uncheck = input("What would you like to change this value to? ")
new_info = int_check(new_info_uncheck)
teams[team_view][information_category] = new_info
elif information_category == "robot_camera":
print(teams[team_view][information_category])
new_info_uncheck = input("What would you like to change this value to? ")
new_info = bool_check(new_info_uncheck)
teams[team_view][information_category] = new_info
else:
print(teams[team_view][information_category])
new_info = input("What would you like to change this value to? ")
teams[team_view][information_category] = new_info
else:
print("This is not an information category.")
else:
print("This is not an existing team number.")

elif initial_user_request == "remove":
delete_team_uncheck = input("Which team would you like to remove? ")
delete_team = int_check(delete_team_uncheck)

if delete_team in teams:
teams.pop(delete_team, None)
else:
print("This is not an existing team number.")

elif initial_user_request == "search":
search_teams = input("Which team would you like to see? (By name or number) ")
if teams == {}:
print("There are no teams in the dictionary.")
else:
for team, category in teams.items():
found_team = False
if search_teams == category["team_name"]:
print("This is an existing team in the dictionary.")
found_team = True
break
elif search_teams[0].isdigit() and int(search_teams) == team:
print("This is an existing team in the dictionary.")
found_team = True
break
if found_team != True:
print("This is not an existing team.")

elif initial_user_request == "list":
for team in teams.keys():
print(team)
print("These are the current teams in the dictionary.")

else:
print("That is not a search option.")

Loading