diff --git a/.github/workflows/python_run.yml b/.github/workflows/python_run.yml new file mode 100644 index 0000000..f6afe8c --- /dev/null +++ b/.github/workflows/python_run.yml @@ -0,0 +1,20 @@ +name: Python Workflow +on: pull_request +permissions: + contents: read + id-token: write +jobs: + Python-Run: + runs-on: ubuntu-latest + steps: + - name: Check out repo + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + - name: Run Python + run: python ./week02/week02.py + + + diff --git a/README.md b/README.md index 9d6f60d..0924e3a 100644 --- a/README.md +++ b/README.md @@ -1 +1,4 @@ -# python_bootcamp \ No newline at end of file +# python_bootcamp +> Attempt to use Github instead of Jupyter for python bootcamp coding + +Let's go!! \ No newline at end of file diff --git a/week02/week02.py b/week02/week02.py new file mode 100644 index 0000000..ebaff1c --- /dev/null +++ b/week02/week02.py @@ -0,0 +1,52 @@ +# Week02 Stuff +## Receipts +# create a product and price for 3 items +p1_name, p1_price = "Books", 49.95 +p2_name, p2_price = "Computer", 579.99 +p3_name, p3_price = "Monitor", 124.89 + +# create a company name and info +company_name = "coding temple, inc." +company_address = "283 Franklin St." +company_city = "Boston, MA" + +# declare ending message +message = "Yo, thank you and come again!!" + +# create a top border +print("*" * 50) + +# print company information first, using format +#print( "\t\t{ }".format(company_name.title()) ) +print( "*\t\t{}".format(company_name.title()), "\t\t *") +print( "*\t\t{}".format(company_address), "\t\t *" ) +print( "*\t\t{}".format(company_city), "\t\t\t *" ) + +# print line between sections +print("=" * 50) + +# print product details +print( "*\t{}\t\t${}".format(p1_name.title(), p1_price), "\t\t\t *" ) +print( "*\t{}\t${}".format(p2_name.title(), p2_price), "\t\t *" ) +print( "*\t{}\t\t${}".format(p3_name.title(), p3_price), "\t\t *" ) +print("=" * 50) + +# print out header for section of total +total = p1_price + p2_price + p3_price +print( "*\t\t\t${}".format(total), "\t\t *" ) + +print("=" * 50) +print( "*", " " * 46, "*\n*\t", message.title(), "\t *\n*", " " * 46, "*" ) +print("*" * 50) + +var_hello = "Hello" +var_hello_len_count = int(len(var_hello)) +print(var_hello_len_count) +var_hello_rev = "" +print(var_hello) +print(var_hello_rev) +while (var_hello_len_count > 0): + var_hello_len_count = var_hello_len_count - 1 + var_hello_rev = var_hello_rev + var_hello[var_hello_len_count] +print(var_hello_rev) +print(var_hello[::-1]) \ No newline at end of file