Find Jobs
Hire Freelancers

Classes and Exceptions

$10-30 USD

Teljesítve
Kiadva ekkor: több mint 6 évvel ezelőtt

$10-30 USD

Teljesítéskor fizetve
Classes allow us to define new types for Python. We can first think of a class as defining a new container – instead of a list, tuple, set, or dictionary, we can have our own collection of values, each with a chosen name rather than an index/key. We can then read out a value or update a value, much like reading or replacing the values in a list or dictionary. But we can also put methods in a class definition, giving us a way to specify the exact ways we should interact with values of this new type. Once we have created a class definition, we can create as many objects of the new type as we want and use them in our programs. We can create entirely new types during the design phase of writing a program. This enables us to think in terms of types (and instances of types) that better model what we see in the real world, instead of endlessly relying on lists or dictionaries (and having to remember exactly how we intended to use those things as proxies for the values we actually had in mind). Exceptions allow us to recover from unusual events – some unavoidable (user types in bad file name or bad input in general), some unexpected (such as IndexErrors when stepping through a list). Without exceptions, we tend to program in an "ask permission, then attempt" style of calculation. But using exceptions, we can instead program in a "try it first, beg for forgiveness" approach by writing code that specifies how to recover from exceptions that we allowed to occur.
Projektazonosító: 15762369

A projektről

5 ajánlat
Távolról teljesíthető projekt
Aktiválva: 6 évvel ezelőtt

Szeretne pénzt keresni?

A Freelancer oldalán történő árajánlatadás előnyei

Határozzon meg költségvetést és időkeretet
Kapja meg fizetését a munkáért
Vázolja ajánlatát
Ingyen regisztrálhat és adhat árajánlatot munkákra
Neki odaítélve:
Felhasználó avatár
I went through the requirements and I would like to do this project if given the opportunity. I am very much familiar with object oriented programming in python. Relevant Skills and Experience Python Programming Proposed Milestones $30 USD - Project Milestone
$30 USD 1 napon belül
4,9 (37 értékelés)
4,8
4,8
5 szabadúszó adott átlagosan $24 USD összegű árajánlatot erre a munkára
Felhasználó avatár
Am very good at Python project you can try me
$20 USD 1 napon belül
0,0 (0 értékelés)
0,0
0,0
Felhasználó avatár
A proposal has not yet been provided
$18 USD 1 napon belül
0,0 (0 értékelés)
0,0
0,0

Az ügyfélről

UNITED STATES zászlója
Woodbridge, United States
4,9
9
Fizetési mód hitelesítve
Tagság kezdete: dec. 9, 2015

Ügyfél-hitelesítés

Köszönjük! E-mailben elküldtük a linket, melyen átveheti ajándék egyenlegét.
E-mailje elküldése során valami hiba történt. Kérjük, próbálja újra.
Regisztrált Felhasználók Összes Közzétett Munka
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Előnézet betöltése
Hozzáférést adott a helymeghatározáshoz.
Belépési munkamenete lejárt, és kijelentkeztettük. Kérjük, lépjen be újra.