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
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.9
python-version: 3.10

- name: Install dependencies with pipenv
run: |
Expand Down
18 changes: 17 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py",
"FLASK_ENV": "development"
},
"args": [
"run",
"--no-debugger"
],
"jinja": true,
"justMyCode": true
}
]
}
}
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ verify_ssl = true
name = "pypi"

[packages]
flask = "*"

[dev-packages]
mypy = "*"
flake8 = "*"

[requires]
python_version = "3.9"
python_version = "3.10"
149 changes: 122 additions & 27 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Tprogramming_2022_zaochn

### Серебрякова
### Установка виртуального окружения

```shell
Expand All @@ -10,4 +11,5 @@ pip install pipenv
pipenv shell
```


После установки pipenv в левом нижнем углу при использовании `vscode` следует выбрать версию интерпретатора, привязанную к проекту
9 changes: 9 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from flask import Flask
from datetime import datetime

app = Flask(__name__)

@app.route("/")
def hello_world():
now = datetime.now()
return f"<p>Hello, World! {now} </p>"
8 changes: 8 additions & 0 deletions lab/2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def kghjy (i,a):
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
for i in a:
if i< 5:
print(i)

if __name__ == "__main__":
kghjy(1,2)
21 changes: 21 additions & 0 deletions lab/l1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import math;

def kghjy (a: float, b: float,x: float)-> float:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давайте осмысленные имена функций


chislitel = math.acos((x**2)-(b**2))

znamenatel = math.asin((x**2)-(a**2))
# math.acos - функция вычисл. аркос
# получаем у
y=chislitel/znamenatel;

return y;
if __name__ =="main":
print(kghjy(0.05, 0.06, 0.15));

hhh=kghjy(0.05, 0.06, 0.26 );
print(hhh)


if __name__ == "main":
print(hhh(0.05, 0.06, 0.15));
14 changes: 14 additions & 0 deletions lab/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import unittest;
import l1;

class TestTask(unittest.TestCase):
def test_kghjy(self):
res = l1.kghjy(0.05, 0.06, 0.15)
self.assertAlmostEqual(77.59,res,2)

def test_kghjy_zeros(self):
res = l1.kghjy(0.05, 0.06, 0)
self.assertAlmostEqual(-629.76, res,2)

if __name__ == '__main__':
unittest.main()