Skip to content

jwarrend/IntroToProg-Python-Mod07

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

IntroToProg-Python-Mod07

Module07 Pickle and Try Catch

Introduction

In this paper, I will be talking about using try/except block and pickling data with python.

Pickle data

To begin, pickling in python is used to serialize and de-serialize object structures. Pickling allows for transferring data from one server to the other. It can then be stored in a file or on a data base. I created two functions to save and read data from a file using pickle dump.

Additional resources: https://www.youtube.com/watch?v=Pl4Hp8qwwes

image

Try/Except block

This particular coding is used to handle errors within our python code. The try block executes when there are no errors. If an error is found, the exception sends out and error message. This can be a custom error message. I added a try/except block that gives an error message if the incorrect type is entered.

Additional resources: Python Tutorial: Using Try/Except Blocks for Error Handling - YouTube

 ![image] (https://user-images.githubusercontent.com/100187338/171067723-ef664dc7-8a73-408a-b27a-ccf00fe999db.png)



 
 ![image] (https://user-images.githubusercontent.com/100187338/171067645-716ddad1-bb52-42b7-b501-a5edef7f7d04.png)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages