Download Waves In The Sky by Rakhi Jayashankar for Free




Book Description : 
Time maneuvered their lives through unforeseen circumstances. The canaries- Charu, Ananya, Neha, Avantika,Raihana and Yami- the heart and soul of Naivedya, run by Ms.Malini. They played together, studied together, stayed together, under the shades of their mother banyan, till they fell apart. Little did they know that they would be centrifuged by the Waves in the Sky. Hanging on to their mother banyan, they held their wings together and fought the storm.
A mind boggling tale of six headstrong girls, thirty years of their life, their mother banyan-Ms.Malini and a mystery.
A thrilling mysterious contemporary fiction.


The book is available to download for free till 22nd May 2019. Kindly, check in your respective websites before downloading.

Link : https://amzn.to/2VENdUu



Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Review: Forever is Not Enough



Forever is Not Enough by Reecha Agarwal Goyal
My rating: 5 of 5 stars


Book Description : 
“Life is what happens when you are busy making other plans.” –Lennon. Meet anay and Rhea, the college Sweethearts who promise to be together in, through and for life, blissfully unaware about life’s plan for them. Witness this saga of the deeply-in-love couple that embarks on the journey of ‘forever’ with beautiful dreams about their future together. But sometimes, forever is not long enough! Inspired by a true incident, this is a story of love, hope, strength, determination and perseverance.


This is one of those books where I just want to share a lot but I don't know where and how I should begin with. Well hence I begin with facts. The cover is brilliantly designed. It truly resembles what's inside the book. The story is agreed cliche but who doesn't love well penned cliches?

I am being honest and I couldn't find any errors in the book. The reason being that I was so engrossed in the story that I couldn't bring out my analytic mind and purposely find errors inside a book. The narration is butter smooth. The language is not so high yet has a lot of smartly used words which can contribute to your vocabulary. If you want to know about the story I can say it is quite relatable with great cliche stories with bitter-sweet endings.

The story is the king here even though the cover makes a good job bringing the bears to the honey filled combs. It is an absolute emotional rollercoaster. I know many just don't like cliches but I am a lover of well written cliches. The author has done a brilliant work with the story-telling and to be very honest I was quite disappointed reading the other reviews across the amazon and goodreads. It felt hardly anyone even bothered to finish it. If they had, they would've known the ending or what was the rollercoaster about or aren't fans of a good story even though a cliche.

Personally I know someone who has been through the phase this story talks about and now I can see and maybe feel what would it have been in their lives at that time and how they fought of that phase. You might feel it is predictable but trust me, last few chapters will make you shout, 'why?' If you know what I mean than you should go for it totally.

Link : https://amzn.to/2VFF7v3



Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Review : Game of Thrones - All Seasons

Image Source : IMDB
About Show : 
Nine noble families wage war against each other in order to gain control over the mythical land of Westeros. Meanwhile, a force is rising after millennia and threatens the existence of living men.

Personally, I don't think I need to introduce you to this show. It is undoubtedly one of the most internet famous shows. Initially backed by and based on A Song of Ice and Fire series by GRR Martin, this how almost took on its own course after season 4 as many of you might know.

Now how writers decided to take the story forward and what they had in discussions with the original author, I really don't know. But one thing that I know is that this series reached its hype only after the season 4. Till then it was known for its gore, adult mature scenes and nudity. Later as the show progressed it became more known for politics, its fantasy plot and ultimately who will bag the throne.

I had been following this series for a long time and I can say that the last two episode took a bitter sweet ending. If you know how 'How I met your Mother' and its last season, yes this felt like it. The hype and excitement rose on top of its charts after season 7 and its last episode especially.

Season 8 was something which was full of bitter sweet moments. There were moments which felt totally lame as there was so much build up for it during the whole series and it just ended without any explanation much. I am so disappointed about the arc of 'night king' and 'dragon queen' both the fantasy elements ended on an off note.

But the more I think about it the more I realise that the books were more into fantasy but the show was more about politics. It kept true to its theme of politics and I feel we as viewers might have been taken off track with all those internet theories about episodes.

I felt the ending couldn't have been much better. How each of the character ended and then when you look at their arcs, it felt complete. I feel ignoring the fantasy part could have been done on purpose as if people there wouldn't be much of an hype if everything was revealed in the fantasy segment in the show. Maybe George wanted to take some time and develop the fantasy in much deeper segment. Who knows? I think it is a way to say that if everyone watches the show hardly a few lovers will even look into the book.

This can be a very long and broad discussion. I'd like to know more about what do you think after the last episode. It just feels like an era has ended since my most favourite shows like Lucifer, The Big Bang Theory and now GOT have ended.





Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Review: Urban Lights



Urban Lights by Vishal Anand
My rating: 4 of 5 stars


Book Description : 
Everyone tells a story.Some inside their own head.Few to the whole world.

Urban Lights is a collection of poignant and heart-warming stories of various people and their lives. Loss or gain, love or pain, joy or sorrow, these are slices of lives that leave an enduring impression on their souls. Stories, which if untold will render the characters anguished.
Written by Vishal Anand after the huge success of 37 + Grace Marks and Emotions Unplugged, Urban Lights takes you on a breezy journey. A journey of simple souls. A journey of simple emotions. A journey of simple affairs. And, the journey assures to feel good!


I just loved this cover design. Well usually I am not the one which goes for funky covers but this one actually looks good and for once it made my non-reader brother get interested in this book for once. Coming to the content part, the stories are really good. I really enjoyed the narration. It made me feel I was one of the characters.

Most stories are in first person which makes the reader feel that the person who has been there is telling you his or her account. Most of these are really short episodes of the moments that we always keep close to our hearts. Alongside each of these episodes have a short message which you can pickup if you are a deep thinker.

I think these short episodes can be enacted in small skit formats if you want, as they are really very close to our daily lives and give a small message as well. There are some good, some funny and some bitter-sweet stories. Usually, I am not the person who takes up on short stories as I always love to dive into new worlds and explore around. But this collection is something I'd recommend to the ones who are first time readers or love short stories or just want someone to start reading.

One thing irked me while reading was the lack of character descriptions. Even though the stories were in first person there was always a lack of character introduction and its basic description. For that you will have to rely on your stereotypical character imaginations and things that you always have seen around you or have known before.

It is a very short and quick read. Also, since these are short stories you can read it while travelling or one story every time when you sit for relishing your favourite beverage during evenings.

Link : https://amzn.to/2JsMzIf



Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Learn Python With Dhawal -10- Chapter - Write A Code For Stone Paper Scissor Game


CHAPTER 10

I feel we have been far enough in our python journey to write a short little fun game to play when we get bored coding. This is a very short program to play Stone, Paper, Scissors with your computer using python. Remember, we aren't on that level where we start working on UI/UX and make a proper app. This would be a barebones app that can run in any terminal or IDLE. This fun little exercise will help you to build your logic further stronger. Obviously on later stages we might use graphical APIs to make a UI for it and make it a real app instead of barebones working code. But for now let's begin with it.

Input :


  1. import random
  2. computerScore=0
  3. userScore=0
  4. continuePlaying=1
  5. Guide={1:"Stone",2:"Paper",3:"Scissor"}

  6. #function to determine who wins and calculate the score
  7. def game(user,computer):
  8.     global computerScore
  9.     global userScore
  10.     if(user==computer):
  11.         print("It's a tie, please play again.")
  12.     elif(user==1 and computer==2):
  13.         print("Computer Wins")
  14.         computerScore+=1
  15.     elif(user==1 and computer==3):
  16.         print("User wins")
  17.         userScore+=1
  18.     elif(user==2 and computer==1):
  19.         print("User wins")
  20.         userScore+=1
  21.     elif(user==2 and computer==3):
  22.         print("Computer Wins")
  23.         computerScore+=1
  24.     elif(user==3 and computer==1):
  25.         print("Computer Wins")
  26.         computerScore+=1
  27.     elif(user==3 and computer==2):
  28.         print("User wins")
  29.         userScore+=1


  30. while(continuePlaying==1):
  31.     #User takes a number from 1-3
  32.     user=int(input("Enter your Choice\n1. Stone\n2. Paper\n3. Scissors\n"))
  33.     #Now we will check for wrong inputs
  34.     if(user>0 and user<4):
  35.         #Now Computer will make a random choice from 1-3
  36.         computer=random.randint(1,3)
  37.         print("User: ",Guide[user],"Computer: ",Guide[computer])
  38.         game(user,computer)
  39.     else:
  40.         print("Invalid Choice, Please Enter A Valid Choice")
  41.         
  42.     continuePlaying=int(input("Do you wish to Continue Playing?\nEnter 1 for Yes and 0 for No\n"))


  43. print("The total scores are : ")
  44. print("User :",userScore)
  45. print("Computer :",computerScore)

  46. if(userScore>computerScore):
  47.     print("User Wins")
  48. elif(computerScore>userScore):
  49.     print("Computer Wins")
  50. else:
  51.     print("It's a tie")
Output:
  1. Enter your Choice
  2. 1. Stone
  3. 2. Paper
  4. 3. Scissors
  5. 1
  6. User:  Stone Computer:  Scissor
  7. User wins
  8. Do you wish to Continue Playing?
  9. Enter 1 for Yes and 0 for No
  10. 0
  11. The total scores are : 
  12. User : 1
  13. Computer : 0
  14. User Wins


  1.  As you can see in line number one we import random, now random is a library we use just like math to bring on some functions that we need to use. You'd see where we are using random in next few lines of code.
  2. Next we create variables computerScore and userScore and initialize both of them to a value 0. Then we create a variable continuePlaying and assign 1 as value to it.
  3. Then we create a dictionary named Guide and assign the key-value pairs. You can skip this step if you want to but later on you'd require to make changes in code. It just makes the game look more real and connecting hence it isn't affecting the actual code even if you remove it. The main logic of the game would still work fine.
  4. Now we build the main logic of our game. It is most easiest as well as complicated part of the code. Easiest as you already know how the Stone, Paper, Scissor game works but complicated part would be implementing that on a computer and make it understand how to play it fair and square.
  5. We define a function named game and pass two variables user and computer as arguments. Remember, we always write the definition of a function before we call it. So if you miss the sequence you might be getting an error. Python is interpreted language and it would cause issue. So we have to write the code in this sequence. 
  6. Next you'd notice something funny. I have written global before the variable computerScore and userScore. Global variables are the ones which can be accessed anywhere in the program. When you create a variable inside the function it's scope aka its life is just inside the function. So when you want to call a global variable inside a function you need to mention that its a global variable that you're using and not creating a new variable with a same name.
  7. Similarly the variables user and computer that we would be using have their scope limited to the function. We just have created the variables using the same name so as to avoid the confusion. You can make new names for the variables that we would be using inside the function if you want, but for simplicity I have kept it the same.
  8. Then we build our IF...ELSE condition staircase to determine the results of the game depending upon the inputs given by user and computer. First we check whether both inputs are same if so we say 'it is a tie' and then we ask user to enter the input once again.
  9. If the inputs are fine and both computer and user input aren't same then we proceed to check who is the winner. We have assigned values to Stone as 1, Paper as 2 and Scissor as 3 for simplicity. You can take the literal names for this purpose as well but it would be a hassle to type and check strings as inputs and make the game slower without any specific benefits for it.
  10. Just build your IF...ELSE nested logic and finish the code. When user wins we increase the userScore variable by 1 and same goes for computer as when computer wins we increase the computerScore variable by 1.
  11. Now our main logic of the game which will decide who wins is done. Next step is that we have to take inputs both from computer and user.
  12. For that I am using a while loop which will keep running as long as the value of continuePlaying variable is 1. Now I have not used the trick like previous codes below as here we are taking user input and if user enters 1 it acts as a boolean true and if user enters 0 it acts as a boolean false but what if user enters something rubbish? The program will crash. Hence if user enters anything else than 1, the game will wind up and just display the final scores and results.
  13. Now we ask user for an input and take it into a variable like we usually do. Then we check if the entered input is greater than 0 and less than 4 which means it can be any of 1,2 or 3 and not anything rubbish. If it is anything else, we will display error message and ask user to enter the input again.
  14. Now if the user input is within range(1,3) we continue and ask computer to generate a integer number between 1 to 3. for that we would use random.randint() method and pass (1,3) as range inside as arguments. This will generate a random number from 1-3 anytime we execute this line of code.
  15. Now, this step is just for fun. We want to know what we gave as input and what computer gave as output. So we will print the names using the Guide that we had previously created and pass the key values as variables user and computer here. This will print what a user has chosen and what computer has chosen i.e. if the user entered 1 as input it will print stone and if computer entered input as 2 it will print paper using 1 and 2 as key values from our dictionary Guide.
  16. Now we call the function game and pass the inputs as arguments. Once it runs then we will ask the user if the want to play again or quit the game. If input is 1 it will run again and else it'll move on to next step.
  17. Now we print the individual scores of user and computer then we create IF....ELSE nested ladder to find out who is the winner and if its a tie and print the result accordingly.
  18. As further touch up steps you can add more conditions and make it much more complex as you want. Like if there's no input from user even once you can say the game was never played. You can add one more variable and loop for it or just one if condition and print statement. Play around with the code and enjoy.



I hope you enjoyed as much as I did writing this chapter. Here you learnt something more about loops, variables as well as functions in a gist and how to go about using them and build your own logic for various things.

<< PREVIOUS CHAPTER || NEXT CHAPTER >>

~*~*~*~

This series is totally authored by me (Dhawal Joshi). Any similarities found on the text, or codes or anything is purely accidental. All the sources of reference will be mentioned, linked and will be given the proper credits. If I miss anything or there's anything wrong, feel free to comment or send me an email and I'll try to edit it out. I am not a Python expert, I am sharing whatever I have learnt on my own and with a few sources around to refer from which will be mentioned. Also feel free to share this series with others so most can benefit out of it.

~*~*~*~

Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Review: Shiva Stone: Hampi's Hidden Treasure



Shiva Stone: Hampi's Hidden Treasure by Ajinkya Bhoite
My rating: 3 of 5 stars


Book Description : 
Om Namah Shivay!

Mithila is a senior archeologist on the Hampi site along with two other UNESCO scientists. They decide to open some secret vaults in the underground Shiva temple. Treasures and artifacts from the 18th century make the headlines but the Shiva Stone was kept a closely guarded secret. 

When a RAW officer hires Mithila on a secret mission to safely transport an ISRO professor and the Shiva Stone to Bangalore, she knows something is up.

Why is the stone called the Shiva Stone? Why are archeologists, UNESCO, ISRO, and RAW interested in a discovery at Hampi? Why is Mithila working for RAW? Is she the only agent on the mission? 


Shiva Stone will take you on a thrilling adventure through the historical site of Hampi. Buy it now!




I really liked the cover design. It is quite mysterious and gives a mytho-fiction vibe to the book. But the blurb makes it clearly a mystery-thriller. Well, I thought it must be a hybrid genre with a mix up of a few as the blurb also gave out scifi-fantasy vibes as well.

To be very honest, I have so many mixed reactions for the book I don't know what to say. I'll share what thoughts I had and then you can decide if it's for you or not. The story begins with Mithila being chosen as RAW recruit but there's no clearance if she's a temporary one or a permanent officer. Then there's this whole discussion about something found in Hampi site.

Hampi is one of the most important UNESCO heritage sites in India. So there's this mystery vibe taking over it. I read book almost like 70% and till then all that was happening was I can say plot building inside the book. Now, some of you might wait for that long to discover what happens and some might just DNF. Then as I continue to read, there's some low action in middle leading to once again thriller mode situation.

The story ends on incomplete tone. I felt something somewhere was hugely missing. I checked if this was actually the end but alas it was. It felt as if the book is a part of a much longer series and this might be a first installment. It felt as if you are watching a show right from the middle with no idea of story before and after. That was the exact feeling I can describe. The story was fast and narration was good, I did find some weird sentences but I won't be a knit-picker and call it as okay.

It felt as if It just ended when I was actually getting interested and then there was just a dead end. Overall it was a short read which ended not as expected. It was such a mix-up that I felt difficult to connect with it or put it in one category. At once it felt like science fiction another moment it felt like mytho-fiction and other moment a total different genre. It was all a confusion for me. I wished there was more on the story part. The concept of Shiva Stone felt mere prop to gain attention and nothing else or maybe I am just reading too much mytho-fiction these days.

Well many of you had asked me to include more details in the reviews hence this is a first attempt at a renewed reviewing format. I tried not to give spoilers but talk more about the book at the same time. Do let me know if you liked this new format.

Link : https://amzn.to/2WR4vPw




Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Review: Line of Control: A Thriller on the Coming War in Asia



Line of Control: A Thriller on the Coming War in Asia by Mainak Dhar
My rating: 3 of 5 stars


Book Description :

It is 2012, and the world is a more dangerous place than ever before. Revolutions have swept aside one Middle Eastern regime after another. A regime allied to Al Qaeda has swept to power in Saudi Arabia, and uses its oil wealth and modern arsenal to further spread Jihad around the world. Yet another military coup brings a fundamentalist regime to power in Pakistan, which initiates an audacious plan to strike the first blow in this new global Jihad. As unprecedented terror attacks stun India, the stage is set for a conflict that brings the Indian subcontinent to the brink of a nuclear apocalypse. With a broad cast of characters that puts the reader into the thick of the unfolding crisis, a fast-paced storyline ripped from today


Seeing the blurb, cover and the praises in the description I was honestly pretty excited to read the book. In past such type of books have been really good for ex, Nation At War Series which is one of my fav by Varun Tejwani. You can check out reviews for the same by clicking here.

Apart from that, the book honestly felt like a cross hybrid between a military weapons encyclopedia and your typical 90's bollywood classic. That's the best I can describe without much revelation of the plot. I am a reader of political thrillers but here the story didn't grab my attention at all. Surely, it was a fast paced and the descriptions along with some gore were quite to the point but it didn't connect at all.

It felt maybe too fast to get in sync with the plot or maybe it was boring, I really can't say. I somehow managed to finish it as it was quite predictable. The author truly states that it is indeed a reflection of the world we are living in right now. It felt like someone just edited real life news too much and just mixed it up really good with a lot of conspiracy theories that are always roaming around in the political realm.

In a gist if you love your typical and very predictable bollywood 'war' thriller you'd love this new flavour but there's nothing much to it unless you are extremely into knowing about new weapons and tactics.

Link : https://amzn.to/2HleXZn



Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Learn Python With Dhawal -9- Chapter


CHAPTER 9

This chapter is going to be more deep in theory than something to do practically yourself. If you are someone who already has a good understand of OOP and SOP concepts then you can surely skip this chapter or just give it a read incase you want to revise. In the world of programming languages there are two types of languages mainly which are classified based on the type of approach they have towards the style in which a particular code is been written and the surrounding logic is built.

A programming language at the end of the day is a language and each language has its own way of writing and reading certain things. We have seen what python has in its grammar vocabulary for the most basics. Python at times also is regarded as a scripting language as it is used in form of Django in creation of websites and popular web apps. Out of all the languages python is most easiest at the same time versatile as it gives you minimum amount of programming constraints to be dealt with. Alongside a con of python is that it is indeed an Higher level aka an advanced level language for which you ought to know basics of coding and how to go around it.

Hence even if it looks super cool and simple to write the code in python but as you go ahead the complexities make it worse for the beginners as according to me python isn't an ideal language to be taught if you are learning to code for the first time. Python is made while keeping in mind the flaws of the original and older programming languages in mind and countering them.

It surely makes it easier for professionals to write huge codes without worrying about a stupid bracket here or a silly semicolon there but it is a huge headache when it comes to writing huge programs due to its over simplicity. Many of you might be aware that just like JAVA, we can also embed C++ and C# or at times even traditional C code depending upon the interpreter that you have been using in both JAVA and Python.

You will be having a question that how all of this is related to Object Oriented Programming Approach, right? Let me explain. JAVA, and Python are OOP Languages, C++ is partially OOP and C is totally SOP ( Structure Oriented Programming Language) also known as Procedural languages as they follow a particular procedure. For python you really don't need to bother about SOP but still to know how it is different I am explaining both SOP and OOP.


SOP  or Structure Oriented Programming Languages like C follow a structural way of writing a code and forming a syntax, for ex :
void main()
{
    int a=5;
    int b=6;
    int c=a*b;
    printf("%d is the result",c);
}

Here as you can see, just like we have in our english language there are full stops to indicate where we are terminating a sentence or command in lingo of machines. A semicolon is used to indicate end of a command and whereas curly brackets are used to mark the start and end of a loop, program or basically any set of statements or code. When you are writing a program in this language you have to take care of its syntax and structure the code properly. Here indentation was just introduced to make code more legible and it didn't had any other use.

If you compare this to a program in python which gives the same output you'd understand what I am talking about.

def fun():
    a=5
    b=6
    c=a*b
    print (c," is the result")

If you see the difference in the lines of code and complexity, you can clearly judge yourself which one looks much cleaner and simpler. Above in C code, if you forgot a semicolon your program won't compile, it apart from that if you had written 'char a' instead of 'int a' it would've shown you error here python takes all that miniscule and menial load away from the programer and assumes certain things which makes it easy for programmers to focus on bigger aspects and issues than dealing with tiny missing semicolons and braces.

Now as you know what and how things work, you'd be better able to understand how OOP works and what it actually is and what makes it so better or different over SOP.
You'd find the distinguishes and other points a lot around the web and I am not interested in doing the menial work but here I am to explain the concept as don't be judgy about the format as I am not writing answer in an exam :P.

In OOP main concept is an object, everything is around that object. You can create, assign as well as delete objects. Now what is an object and how it makes things easier and better? An Object is nothing but an instance of a Class. Now, what is a class?

A class is a file in layman terms in which you have written your program. Generally you just write one class in one file to keep it simple. Think of it as a single class and name of your class is name of your program.

You can try this if you want but not needed.
Since we had been dealing with jupyter notebook till date, we had not been worrying about class or programs and everything else. But since we are moving ahead on the concept of class and building multiple class programs ahead, we have to look into how an actual program is written and executed without crutches of IDE or any fancy software.

If you have python installed in your system, you can open the terminal or command prompt or whatever you call in your respective operating systems.  Then you need to open notepad or any similar program ( I recommend Notepad++ as its open source and much fun to use for simpler things) and write down a simple basic python code and then save it as .py extension.

Now once you are done with that, open terminal and head into the directory where that piece of code is located, for ease you can just keep that code on your desktop and right click to open terminal there on windows.

You need to locate your directory by using command 'cd/Desktop' keep in mind desktop d can be large or small so google up on how to locate it in the terminal. Later just in terminal type 'python' followed by the filename.py and let the code run. You would realise there was no difference in it when you tried the code inside IDE and when you tried it like this. It is because IDEs and other such software make it easier to write code and focus less on miniscule things like this.
It ends here.

So, now since you have a much better understanding of class and what it is let me explain what an object is and what it's instance means. In SOP whenever you had to bring in functionality that was written in some another code file aka class, you had to either copy the whole thing or just write it again in a way that it doesn't hamper your next code. As time passed there arose many work arounds for this like the import which just eased the work on the programmer's part since you didn't have to copy it manually but the machine behind the scenes did the same thing for you.

So now to end this stupidity as where we used loops and functions to avoid redundancy of code and make it faster here we had issues with redundancy again. Imagine you had to write a program for calculator and each of the functions like addition, subtraction etc are in their own classes. Now if you wanted to have a button for percentage or compound interest, you had to copy all that code again in those respective classes or basically import.

In OOP approach, an object is created, now object is nothing but an instance of class. Here, instead of copying everything we just point at a particular thing we need and then its either copied or just linked up depending on what language are you using. Think of it as a direction pointer on a map or bookmark on a book.

So when you are coding next time and a machine is executing, you get rid of that redundancy. Again there are various redundancies based on compilers and interpreters but that's another whole subject and huge topic of its own. Here we dealt with the redundancies from programmer's end with OOP.

Note :
Although OOP is better, it's not all pro and it has some of its cons as well. Here I am linking some distinguish points about OOP. Now you can read more about OOP Approach here. You can totally skip it if you don't want to read as it won't much matter but you need to know some concepts and are to be kept in mind while writing the code such as encapsulation, inheritance and polymorphism.

You can totally skip this if you feel confused  or don't understand it now but I'd recommend to just go over it and give it a read as it might help to you understand it much better when I'd explain it while working on a code.

Here are some basic concepts of OOP. (Source webopedia )


  1. Abstraction: The process of picking out (abstracting) common features of objects and procedures.
  2. Class: A category of objects. The class defines all the common properties of the different objects that belong to it.
  3. Encapsulation: The process of combining elements to create a new entity. A procedure is a type of encapsulation because it combines a series of computer instructions.
  4. Information hiding: The process of hiding details of an object or function. Information hiding is a powerful programming technique because it reduces complexity.
  5. Inheritance: a feature that represents the "is a" relationship between different classes.
  6. Interface: the languages and codes that the applications use to communicate with each other and with the hardware.
  7. Messaging: Message passing is a form of communication used in parallel programming and object-oriented programming.
  8. Object: a self-contained entity that consists of both data and procedures to manipulate the data.
  9. Polymorphism: A programming language's ability to process objects differently depending on their data type or class.
  10. Procedure: a section of a program that performs a specific task.






In Next chapter we will learn about importing libraries and some other basic inbuilt fancy functionalities of python and its libraries.


~*~*~*~

This series is totally authored by me (Dhawal Joshi). Any similarities found on the text, or codes or anything is purely accidental. All the sources of reference will be mentioned, linked and will be given the proper credits. If I miss anything or there's anything wrong, feel free to comment or send me an email and I'll try to edit it out. I am not a Python expert, I am sharing whatever I have learnt on my own and with a few sources around to refer from which will be mentioned. Also feel free to share this series with others so most can benefit out of it.

~*~*~*~


Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Review: Ganesha: An Afro-Asian story



Ganesha: An Afro-Asian story by Syd K.
My rating: 4 of 5 stars

Book Description :

On the trail of Ganesha, the Afro-Asian calf, born by a quirk of fate and in the most improbable of circumstances in the wilds of East Africa in 1943. Then begins his journey to the Southern wilds of India and his fight for survival in those new wilds. 

Born on the same day as Ganesha in a rural hamlet of Southern India is Maari, who goes on to become one of the most dreaded poachers India has ever known. 

And know how their fates inevitably cross over the decades during which there are profound changes in both the political and ecological landscape of India.



To be totally honest, I actually had rejected the review offer first when I had encountered the book. Usually by looking at the cover and blurb I can pretty much decide whether I'd totally like the book or just thrash it. Usually if there's a possibility of me not liking it, I rather avoid the book instead of thrashing it. But here it was something different. I actually was offered the book again by a friend Richa from HBB and I couldn't refuse her. In a way, I am glad I didn't reject it again.

Neither did the blurb not the cover revealed much about the book. It was a very weird and absurd combination as from the cover it look as some sort of encyclopedia book types which shared a ton of info about elephants and their conservations and what not but from the blurb it felt like a story from elephant's point of view. If you have seen the animated movie 'Jumbo' you'd get what I am trying to convey.

This was like double crossing my prediction and confused me. Well now since it was in my TBR pile I had to check it out and read it anyway. I thought if it turned out to be something which I'd have tendency to trash, I would just refuse and leave a neutral review. But honestly it surprised me to an extent I had to leave my bias and somewhat it solved my confusion.

The only thing I despise about this book is its lack ability to just attract reader both by cover and blurb. The content here inside is interesting but the blurb and cover just kind of repluses and confuses readers. Generally, most readers would just stay out of taking a chance and buying something which doesn't feel good.

Coming to the content, I feel it is something which you should read and see how it fairs in your opinion. Personally the geek me loved the info and way the information about a certain species and its interactions with humans was told in a story manner.

I feel it is like a readable wildlife documentary. If you are someone like me who loves watching wildlife documentaries then you'd surely love this one. Also if you are someone who just loves the flora and fauna, along with knowing more about them you can check this book out. I am guaranteed that it won't disappoint you.

Link : https://amzn.to/2VuP3Mm




Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :

Learn Python with Dhawal -8-Chapter


CHAPTER 8

Before we move on forward and learn the concepts of OOP ( Object Oriented Programming) and learn how it is different to implement the concept while programming multiple class long programs, let's first get a full understanding of using and playing with functions inside a single class or you can say inside a single file code.

PROBLEM STATEMENT

Make a calculator using functions to take input from user and perform the operations as per user choice in a single class.

Now before we begin, if you remember how we had made a addition and subtraction function in previous chapters, it is very close to on that lines. Before we move ahead and code together you can try on your own and see if you can make one on your own without my help at all. If you tried it, do comment and send me an email with your code if you want my feedback on it. Obviously I'd try to help as much as I can.

Now If you tried or you just want to go along with me here is how we are going to do it. I am explaining how we are going to make it and then I'll explain the actual coding example with the desired output.

First step would be to analyse the problem statement and then try to make constraints which will help you to set a kind of a rough boundary and get you a very rough idea of what you actually need in your program. You can take a pencil and paper and try out yourself before reading ahead and then you can cross check to self evaluate and see how much of it did you guessed correctly. Also, usually you don't do guess work when you are dealing with technical specifics but since we are learning here we can always afford to make mistakes and learn in much better manner.

So as per out first step we want to have a rough idea of what exactly we have to make or keep in mind will writing the code. Here's a few things I deduced from the problem statement.


  1. We have to make a calculator.
  2. It has to take user inputs
  3. It has to perform operations based on  user's choice
  4. It has to be done all within a single class.
  5. If we have to take inputs we would need input() method and some variables to catch input
  6. We have to make functions for each operation which would be called based on user input to perform a particular task
  7. We need to have input variables for taking the user input for performing operations
  8. We have to display the results as well
  9. We would need to ask what operation is to be performed.
  10. We need something to check what input user has give and then check if it fits in our options.
Here these are a very few points but as we know that this code is to do as much as we can, I am going to add some more features and functionalities to the code just to show you how much can you do even from a simple problem statement. But this depends all in your creativity and understanding of logic. I'll explain everything at the end but until then, lets begin.

Note : # is used to note down a comment in middle of the code, commenting in a code is considered as a very good pro habit since at times if you are working on project and someone has to take you over for some other reason it just improves the readability of the overall code as you don't always have to explain what your logic was to someone else.

# is used to have a single line comment. But there are various ways to post a multiple line comment as it differs from interpreter to interpreter as every installation has its own way but # is used in every command line based as well as software interface. If you press enter then it is no longer a single line comment keep that in mind. As you'd notice it with the lines of code shown in the example below. Do notice the line numbers.

Another thing is that the backslash operands like \n and \t are used to get the pointer to next line in output and to a tab space later respectively. You might have noticed it in the previous pattern printing chapters.

I have explained most of the code with the help of the comments and rest I feel you are smart enough to deduce the other basic things. If not you can always comment and ask a doubt. I'll be more than happy to answer. Also take your sweet time to understand this simple code.


Code
Input


  1. #creating an addition function
  2. def addition (a,b):
  3.     a=a+b
  4.     print ("The result of addition is ",a)
  5.     
  6. #creating a subtraction function
  7. def subtraction (a,b):
  8.     a=a-b
  9.     print ("The result of subtraction is ",a)
  10.     
  11. #creating a multiplication function
  12. def multiplication (a,b):
  13.     a=a*b
  14.     print ("The product is ",a)
  15.     
  16. #creating a division function
  17. def division (a,b):
  18.     a=a/b
  19.     print ("The quotient after divsion is ",a)

  20. #creating a modulus division function
  21. def moddiv (a,b):
  22.     a=a%b
  23.     print ("The remainder after division is ",a)

  24. #Once we are done with Creating functions
  25. # First we would need to make a variable to see if the program should run again or not once an operation is finished.
  26. choice=1

  27. #Putting 1 or 0 inside conditions means telling the condition is true or false respectively.
  28. while(choice):
  29.     #take both input numbers
  30.     a=int(input("Enter the a "))
  31.     b=int(input("Enter the b "))
  32.     #printing both numbers
  33.     print("The a is ",a," and b is ",b)
  34.     #now we have taken a variable which will let user enter the choice again if he/she had entered a wrong option.
  35.     run_loop=1
  36.     #since the default value of run_loop is kept 1 it will mean true and while loop will run

  37.     while(run_loop):
  38.         #take the choice from the user what what operation they want to peform.
  39.         c=int(input("Enter the correct number for the operation you want to perform.\n1. Addition (a+b)\n2. Subtraction (a-b)\n3. Multiplication (a*b)\n4. Division (a/b)\n5.Modulus Divison (a%b)\n"))
  40.         print ("You chose option number ",c)
  41.         if(c==1):
  42.             #a function is called depending on the choice made
  43.             addition(a,b)
  44.             #making run_loop 0 means next time it won't run while loop and it will get out of this while loop.
  45.             run_loop=0
  46.         elif(c==2):
  47.             subtraction(a,b)
  48.             run_loop=0
  49.         elif(c==3):
  50.             multiplication(a,b)
  51.             run_loop=0
  52.         elif(c==4):
  53.             division(a,b)
  54.             run_loop=0
  55.         elif(c==5):
  56.             moddiv(a,b)
  57.             run_loop=0
  58.         else:
  59.             #we haven't made any run_loop changes as we want user to enter the valid choice again for the same set of numbers.
  60.             print("sorry invalid input, enter the correct choice again.")

  61.     #once the operation is over, we can ask user if they want to do more calculations or just end the program.
  62.     choice=int(input("Enter 1 to continue and 0 to end the program\n"))
  63. #This will print a thanks note and end the program.
  64. print ("Thank You for Using our calculator program, you'd need to run the program again to perform more calculations.")
Output :


  1. Enter the a 10
  2. Enter the b 5
  3. The a is  10  and b is  5
  4. Enter the correct number for the operation you want to perform.
  5. 1. Addition (a+b)
  6. 2. Subtraction (a-b)
  7. 3. Multiplication (a*b)
  8. 4. Division (a/b)
  9. 5.Modulus Divison (a%b)
  10. 1
  11. You chose option number  1
  12. The result of addition is  15
  13. Enter 1 to continue and 0 to end the program
  14. 1
  15. Enter the a 10
  16. Enter the b 5
  17. The a is  10  and b is  5
  18. Enter the correct number for the operation you want to perform.
  19. 1. Addition (a+b)
  20. 2. Subtraction (a-b)
  21. 3. Multiplication (a*b)
  22. 4. Division (a/b)
  23. 5.Modulus Divison (a%b)
  24. 9
  25. You chose option number  9
  26. sorry invalid input, enter the correct choice again.
  27. Enter the correct number for the operation you want to perform.
  28. 1. Addition (a+b)
  29. 2. Subtraction (a-b)
  30. 3. Multiplication (a*b)
  31. 4. Division (a/b)
  32. 5.Modulus Divison (a%b)
  33. 4
  34. You chose option number  4
  35. The quotient after divsion is  2.0
  36. Enter 1 to continue and 0 to end the program
  37. 0
  38. Thank You for Using our calculator program, you'd need to run the program again to perform more calculations.
I hope you have a better understand of using functions and are able to build your own logic if a particular problem statement is been given. If you want some practise questions then always feel free to comment down below, I'd be happy to provide you with materials.




In Next chapter we will learn about the concept of OOP and how to its related to python.


~*~*~*~

This series is totally authored by me (Dhawal Joshi). Any similarities found on the text, or codes or anything is purely accidental. All the sources of reference will be mentioned, linked and will be given the proper credits. If I miss anything or there's anything wrong, feel free to comment or send me an email and I'll try to edit it out. I am not a Python expert, I am sharing whatever I have learnt on my own and with a few sources around to refer from which will be mentioned. Also feel free to share this series with others so most can benefit out of it.

~*~*~*~


Do comment and share your thoughts about it! I'd love to know what do you think. Also, I'd keep updating it quite often so do follow the Website to get all the updates by clicking here.

Also, a minor headsup.... Obsessed is free to read on Kindle Unlimited! Do check it out. I'd be glad to read your reviews!
Share :