Skip to content

Latest commit

 

History

History

0x05-python-exceptions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

0x05. Python - Exceptions

Description

What you should learn from this project:

  • Why Python programming is awesome (don’t forget to tweet today, with the hashtag #pythoniscool :))
  • What’s the difference between errors and exceptions
  • What are exceptions and how to use them
  • When do we need to use exceptions
  • How to correctly handle an exception
  • What’s the purpose of catching exceptions
  • How to raise a builtin exception
  • When do we need to implement a clean-up action after an exception

  • Write a function that prints x elements of a list.
  • Write a function that prints an integer with "{:d}".format().
  • Write a function that prints the first x elements of a list and only integers.
  • Write a function that divides 2 integers and prints the result.
  • Write a function that divides element by element 2 lists.
  • Write a function that raises a type exception.
  • Write a function that raises a name exception with a message.
  • Write a function that prints an integer.
  • Write a function that executes a function safely.
  • Write the Python function def magic_calculation(a, b): that does exactly the same as the following Python bytecode:
  • Create three C functions that print some basic info about Python lists, Python bytes an Python float objects.

Python lists:


Author