📜  munshi premchand idgah - Python (1)

📅  最后修改于: 2023-12-03 15:17:45.061000             🧑  作者: Mango

Munshi Premchand Idgah - Python

Munshi Premchand Idgah is a famous short story written by the renowned Hindi writer, Munshi Premchand. In this story, the author beautifully portrays the innocence and purity of a young boy named Hamid, who experiences the joy of giving and the importance of love and compassion.

Introduction

The story revolves around the central character, Hamid, who belongs to a poor family. Hamid loves his grandmother, who takes care of him and showers him with affection. On the day of Eid, Hamid wakes up excitedly to celebrate the festival, but he realizes that he doesn't have new clothes or money like his friends.

Development

Moved by Hamid's innocence and determination to participate in the festive celebrations, the author takes us on a journey of emotions and selfless acts. Premchand captures the essence of Eid through Hamid's perspective, showing us that joy and happiness don't always depend on material possessions.

In the story, Hamid's grandmother gives him a small amount of money to spend at the Idgah (a place where Muslims gather to offer prayers during Eid). Rather than spending it on himself, Hamid decides to use the money to buy a clay toy for his grandmother.

Implementation (Python Code)
def celebrate_eid():
    money = 10  # Assume Hamid has 10 units of currency
    toy_price = 5  # Assume the clay toy costs 5 units of currency
    money -= toy_price
    
    # Check if Hamid has enough money to buy the toy
    if money >= 0:
        return f"Hamid bought a clay toy for his grandmother. Now he has {money} units of currency left."
    else:
        return "Hamid couldn't buy the toy as he didn't have enough money."

result = celebrate_eid()
print(result)
Conclusion

"Munshi Premchand Idgah" teaches us the values of love, compassion, and selflessness through the eyes of a young boy. It reminds us that the true joy of any festival lies in spreading happiness and caring for our loved ones, rather than focusing solely on material possessions.

Note: The code provided is a simple implementation to showcase the concept of Hamid buying a clay toy using Python.