File and Error Handling

File and Error Handling

Hello there

File is just an object that is created in our operating system. File can be a source code, video and photo...

JSON FILE:

Json file (JavaScript Object Notation): As we know, computers communicate. And to communicate, they need a language. Imagine Python and Javascript want to send each other information, they both don't need to learn Python and Javascript. Instead, they use the common language of communication in programming, JSON, to send each other messages can then be translated from JSON into their respective language. The same problem if you are traveling to different countries. You need to learn each language for every country. But wouldn't be better is instead of learning one language for every country, you could learn just English, which let us assume is understand in most of the countries.

json file format

Now, why JSON file is easy to read and structured data format? Let's say you would like to place an order for your dinner. You can say --> May i have a three eggs, no no three not two with one "la vache qui rit" and this "harcha" and a cup of milk, please <-- This takes time, and for 100 orders a day ( just the ones who wake up for dinner), this is a lot of time wasted in explaining.

Instead, what if there was a standard format to take the order? the restaurant could save a lot of time. Let's say it took the order in this format -->

egg count: 3

"la vache qui rit": 1

"harcha": 1

"milk": one cup

The above would be more easier for the server to note and to communicate to the chef. it is the same analogy how json work between languages, easy to read and structured format.

I will update my work to add explanations to other files. Please visit my GitHub repository file_and_error_handling and check the technical section in the file handling with Python






要查看或添加评论,请登录

Hamza Fatnaoui的更多文章

  • K-NN ( K Nearest Neighbor )

    K-NN ( K Nearest Neighbor )

    Hey folks, I hope you're doing well. KNN stands out as one of the fundamental algorithms in machine learning.

    6 条评论
  • OS module in python

    OS module in python

    The os library in Python provides a way for developers to interact with the operating system. Imagine Python, a new…

  • What Is Web Scraping?

    What Is Web Scraping?

    Hey there! I hope you are doing well. You, like me, are an internet user with access to millions of websites that share…

  • The Average of The Averages is The Average

    The Average of The Averages is The Average

    Hey there! I hope you are doing well. Have you ever wondered how scientists can draw conclusions about a big group by…

  • The difference between A Data Analyst and A Data scientist?

    The difference between A Data Analyst and A Data scientist?

    hello folks, hope you are doing well A Data analyst: "As a student at AIAC University, my teacher asked me to 'provide…

  • What Is Supervised Learning and What Is Unsupervised Learning?

    What Is Supervised Learning and What Is Unsupervised Learning?

    Hey folks Supervised Learning: Let's say i am playing with a small kid of age 3.I took two devices in-front of him…

  • Mastering the Art of Data Preparation: A Fundamental Step in Data Science

    Mastering the Art of Data Preparation: A Fundamental Step in Data Science

    Hello folks The first part of any data science project is preparing your data, which means making sure its in the right…

社区洞察

其他会员也浏览了