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

#75 #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

#75 #122

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
4 changes: 4 additions & 0 deletions .github/workflows/corretor_de_exercicios_secao_05.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ jobs:
if: always()
run: |
python -m doctest -f secao_05_exercicios_funcoes/ex_01_piramide.py
- name: Correção do Exercício 09 da seção de Funções
if: always()
run: |
python -m doctest -f secao_05_exercicios_funcoes/ex_09_numero_invertido.py
19 changes: 19 additions & 0 deletions secao_05_exercicios_funcoes/ex_9_numero_invertido.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Exercicio 9 da seção de funções da Python Brasil:
https://wiki.python.org.br/EstruturaDeRepeticao

Faça uma função que retorne o reverso de um número inteiro informado. Por exemplo: 127 -> 721.

>>> inverter_numero_inteiro(7604)
4067
>>> inverter_numero_inteiro(1020304)
4030201
>>> inverter_numero_inteiro(10.56)
Esse teste é inválido pois possui um número não inteiro
>>> inverter_numero_inteiro(8)
Digite mais de um número
"""

def inverter_numero_inteiro(n):
"""Escreva aqui em baico a sua solução"""
print (funcao_de_reverter(n))