Back

Sanskar

Keen Learner and Exp... • 24d

Day 12 of learning python as a beginner. Topic: object oriented programming (OOP). Yesterday I shared a journal taking app and many people suggested that it would be great if I used classes. Initially I was not aware of what classes actually are and today I decided to learn just that. Also I think that I might need a little more practise in this to get it on my finger tips. A class is like a blueprint of creating objects it allows you to group data (attributes) and functions (methods) together under one structure. It is just like some sort of empty template. The __init__ or initialize contains a set of default vales which can be modified later in the program. The self here refers to the current object. using this knowledge I tried to create a basic banking app where you can check your balance (not real of course), deposit money, withdraw money and get account info. In class I created account_info function which I will be using to check the account info. then I used dictionary as a database. and created a user_identity function to match that the name is actually present in the database i.e. the dictionary. Then I used my if elif and else table to match all the situations and to give the most appropriate result. I was also about to add some more function but then realised that the day is almost over and I have to give an update. 😅 Here's my code and it's result. Feel free to ask any questions and to give any suggestions and challenges which will help me improve.

Reply
2

More like this

Recommendations from Medial

Sanskar

Keen Learner and Exp... • 23d

Day 13 of learning python as a beginner. Topic: create a meeting booking program with classes. Yesterday I shared my banking program and many amazing people pointed out that I didn't used classes properly and the code looks more like script. So I o

See More
Reply
2
Image Description
Image Description

Rohit Gupta

Aspiring Web Develop... • 1y

Day30 of 100daysofcodechallenge... Today I learned about Object Literal, Array of object and Math object In JavaScript. I also make a basic "Guess The Number" game.

5 Replies
8

Rohit Gupta

Aspiring Web Develop... • 1y

Day30 of 100daysofcodechallenge... Today I learned about Object Literal, Array of object and Math object In JavaScript. I also make a basic "Guess The Number" game.

Reply
4

Sanskar

Keen Learner and Exp... • 12d

Day 24 of learning python as a beginner. Topic: decorators Somebody has suggested me that I should focus on some of the important things and he gave me a list of topics to learn. Decorators were at very top of that list and therefore I decided to l

See More
Reply
1

Sanskar

Keen Learner and Exp... • 18d

Day 17 of learning python as a beginner. Topic: lambda functions + email filter Lambda functions are a single line anonymous function without using the usual def key word. All function: checks whether all the key words (spam_keywords) are present

See More
Reply
2
Image Description
Image Description

Ravi Handa

Early Retiree | Fina... • 11m

The ability to work goes down once you have stopped working. Couple of classes / recordings a day was sort of usual for me. Couple of times a month it used to be 6-8 hours of live classes as well. Now if I have to do even half of that - it feels

See More
3 Replies
17

Sanskar

Keen Learner and Exp... • 25d

Day 11 of learning python as a beginner. Topic: creating journal entry program using file I/O. I got a little sidleline from my original plan of editing my to-do list program and created an entirely new program this time for writing a daily journal

See More
Reply
1
10

Sanskar

Keen Learner and Exp... • 11d

Day 25 of learning python as a beginner. Topic: database handling. I used to write simple programs which just showed some text in the console when I started learning python. I didn't used to store that data somewhere because I didn't know how to.

See More
Reply

Sanskar

Keen Learner and Exp... • 17d

Day 19 of learning python as a beginner. Topic: JSON file (exploring surface). JSON stands for JavaScript Object Notation however it is not limited to JavaScript only. JSON is used to store and share structured data which is both readable by human

See More
Reply
2

Sidharth Bidikar

Keep Moving • 10m

Which function can be used to combine text from different cells into one cell without using the CONCATENATE function? A) TEXTJOIN B) CONCAT C) JOIN #excel #dataanalyst #data #dataanalysis #dataanalytics

Reply
1
6

Download the medial app to read full posts, comements and news.