Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- def sumar(a,b):
- """
- Función que pide dos numeros y retorna la suma entre ellos
- """
- if not isinstance(a, (int,float)) or not isinstance(b,(int, float)):
- raise TypeError("Se requieren dos números")
- return a+b
- a = "Hola"
- b = "Chau"
- print(sumar(a,b))
Advertisement
Add Comment
Please, Sign In to add comment