Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualizando as primeiras informações no navegador #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
Empty file added __init__.py
Empty file.
Binary file added __pycache__/app.cpython-37.pyc
Binary file not shown.
Binary file added __pycache__/teste.cpython-37-pytest-5.2.1.pyc
Binary file not shown.
20 changes: 20 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from flask import Flask

tasks = [
'ir pro medico',
'fazer feira'
]
usuario = 'luanda'

app_flask = Flask(__name__)

@app_flask.route('/')
def index():
return "Oi, Mundo!"

@app_flask.route('/usuario')
def get_usuario():
return usuario

if __name__ == '__main__':
app_flask.run()
13 changes: 13 additions & 0 deletions app2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def resultado_prova(nota):
if nota > 7:
print('aprovada')
elif nota > 5:
print('aprovada raspando')
else:
print('reprovada')



resultado_prova(4)
resultado_prova(8)
resultado_prova(2)
1 change: 0 additions & 1 deletion teste.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest


def teste_se_app_foi_criado():
assert (2 + 2) == 4