Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs220-lecture-material
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CDIS
Computer Sciences
Courses
CS220
cs220-lecture-material
Commits
796a40fc
Commit
796a40fc
authored
1 year ago
by
LOUIS TYRRELL OLIPHANT
Browse files
Options
Downloads
Patches
Plain Diff
updated project.py in lec 12
parent
8bcc655f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
s24/Louis_Lecture_Notes/12_Iteration_Practice/project.py
+6
-6
6 additions, 6 deletions
s24/Louis_Lecture_Notes/12_Iteration_Practice/project.py
with
6 additions
and
6 deletions
s24/Louis_Lecture_Notes/12_Iteration_Practice/project.py
+
6
−
6
View file @
796a40fc
...
@@ -22,7 +22,7 @@ def get_lecture(idx):
...
@@ -22,7 +22,7 @@ def get_lecture(idx):
def
get_section
(
idx
):
def
get_section
(
idx
):
"""
get_lecture(idx) returns the section of the student in row idx
"""
"""
get_lecture(idx) returns the section of the student in row idx
"""
return
__student__
[
int
(
idx
)][
'
s
ection
'
]
return
__student__
[
int
(
idx
)][
'
S
ection
'
]
def
get_age
(
idx
):
def
get_age
(
idx
):
...
@@ -32,12 +32,12 @@ def get_age(idx):
...
@@ -32,12 +32,12 @@ def get_age(idx):
def
get_primary_major
(
idx
):
def
get_primary_major
(
idx
):
"""
get_primary_major(idx) returns the primary major of the student in row idx
"""
"""
get_primary_major(idx) returns the primary major of the student in row idx
"""
return
__student__
[
int
(
idx
)][
'
Primary
m
ajor
'
]
return
__student__
[
int
(
idx
)][
'
Primary
M
ajor
'
]
def
get_other_majors
(
idx
):
def
get_other_majors
(
idx
):
"""
get_other_majors(idx) returns the secondary major of the student in row idx
"""
"""
get_other_majors(idx) returns the secondary major of the student in row idx
"""
return
__student__
[
int
(
idx
)][
'
Other
m
ajors
'
]
return
__student__
[
int
(
idx
)][
'
Other
M
ajors
'
]
def
get_zip_code
(
idx
):
def
get_zip_code
(
idx
):
...
@@ -47,11 +47,11 @@ def get_zip_code(idx):
...
@@ -47,11 +47,11 @@ def get_zip_code(idx):
def
get_pizza_topping
(
idx
):
def
get_pizza_topping
(
idx
):
"""
get_pizza_topping(idx) returns the preferred pizza toppings of the student in row idx
"""
"""
get_pizza_topping(idx) returns the preferred pizza toppings of the student in row idx
"""
return
__student__
[
int
(
idx
)][
'
Pizza
t
opping
'
]
return
__student__
[
int
(
idx
)][
'
Pizza
T
opping
'
]
def
get_cats_or_dogs
(
idx
):
def
get_cats_or_dogs
(
idx
):
"""
get_cats_or_dogs(idx) returns whether student in row idx likes cats or dogs
"""
"""
get_cats_or_dogs(idx) returns whether student in row idx likes cats or dogs
"""
return
__student__
[
int
(
idx
)][
'
Cats or
d
ogs
'
]
return
__student__
[
int
(
idx
)][
'
Cats or
D
ogs
'
]
def
get_runner
(
idx
):
def
get_runner
(
idx
):
"""
get_runner(idx) returns whether student in row idx is a runner
"""
"""
get_runner(idx) returns whether student in row idx is a runner
"""
...
@@ -59,7 +59,7 @@ def get_runner(idx):
...
@@ -59,7 +59,7 @@ def get_runner(idx):
def
get_sleep_habit
(
idx
):
def
get_sleep_habit
(
idx
):
"""
get_sleep_habit(idx) returns the sleep habit of the student in row idx
"""
"""
get_sleep_habit(idx) returns the sleep habit of the student in row idx
"""
return
__student__
[
int
(
idx
)][
'
Sleep
h
abit
'
]
return
__student__
[
int
(
idx
)][
'
Sleep
H
abit
'
]
def
get_procrastinator
(
idx
):
def
get_procrastinator
(
idx
):
"""
get_procrastinator(idx) returns whether student in row idx is a procrastinator
"""
"""
get_procrastinator(idx) returns whether student in row idx is a procrastinator
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment