Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
ban265
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Ang
ban265
Commits
3e846885
Commit
3e846885
authored
Feb 07, 2024
by
MichaelAng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ban265] hw2
parent
c68a7103
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
Dockerfile
Dockerfile
+1
-1
Makefile
Makefile
+6
-1
hw2.py
hw2.py
+27
-0
No files found.
Dockerfile
View file @
3e846885
...
@@ -7,4 +7,4 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
...
@@ -7,4 +7,4 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY
/ ./
COPY
/ ./
ENTRYPOINT
["python", "main.py"]
ENTRYPOINT
["python"]
\ No newline at end of file
\ No newline at end of file
Makefile
View file @
3e846885
...
@@ -14,7 +14,12 @@ exec:
...
@@ -14,7 +14,12 @@ exec:
.PHONY
:
run
.PHONY
:
run
run
:
run
:
$(DOCKER_BASE_CMD)
\
$(DOCKER_BASE_CMD)
\
ban265
ban265
"main.py"
.PHONY
:
run_hw2
run_hw2
:
$(DOCKER_BASE_CMD)
\
ban265
"hw2.py"
.PHONY
:
fmt
.PHONY
:
fmt
fmt
:
fmt
:
...
...
hw2.py
0 → 100644
View file @
3e846885
# Ang, Michael
# BAN 265 A
# Homework 2
# 2024-02-07
# Question 1
book
=
8.99
tax_rate
=
0.07
v_payment
=
round
(
book
+
book
*
tax_rate
,
2
)
print
(
v_payment
)
# Question 2
product_code
=
"38BEE27"
v_industry_code
=
product_code
[
0
:
2
]
v_class_type
=
product_code
[
2
]
print
(
v_industry_code
)
print
(
v_class_type
)
# Question 3
weight
=
60.0
# kg
height
=
1.7
# meter
v_bmi
=
round
(
weight
/
height
**
2
,
2
)
print
(
v_bmi
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment