Posts Tagged ‘Project’

Python : Expenditure App

November 28, 2018 2 comments

Expenditure Application

User input ‘choice’:

In today post we will add the user input to our menu and based on the user input the app some function will run. As we said in the previous post The Menu we will use (9) to Exit from the application.

To read the user input we will use ‘input(‘something’)’ statement and The Menu def will return the choice back so our if statement will take us to another function, or EXIT if choice = 9, so let’s start.

As we can see in the last two lines of the_menu def, we have

choice = input(‘What you want to do? ‘) and return choice

Then in the main application body we will have while statement holding if statement as here:

choice = the_menu() # Here we are calling the menu and putting the return in the choice.
while choice != ‘9’ :

if choice == ‘1’:

# Calling “Add New Entry” function

choice = the_menu()

if choice == ‘2’:

# Calling “Delete an Entry” function

choice = the_menu()

if choice == ‘3’:

# Calling “Change an Entry” function

choice = the_menu()

if choice == ‘4’:

# Calling “Show Total Expenditure in a Year.” function

choice = the_menu()

if choice == ‘5’:

# Calling “Show Expenditure Details in a year.” function

choice = the_menu()

if choice == ‘9’:

choice = the_menu()


Your code should be something like what we have in the image.


Python : Expenditure App

November 27, 2018 3 comments

Expenditure Application

The Menu:

Continuing parts of the Expenditure Application, here is the basic menu that we will use in our app. We will select (9) as Exit from the system.

So now, we have a json file with sample data and stored in a directory, also we have a file called “” and we will write the menu def in it and save it.

def the_menu(): # This is a menu

print(‘1. Add New Entry.’)

print(‘2. Delete an Entry.’)

print(‘3. Change an Entry.’)

print(‘4. Show Total Expenditure in a Year.’)

print(‘5. Show Expenditure Details in a year.’)

print(‘9. Exit.’)

# This line will ask the user to enter the operation he want to do.

choice = input(‘What you want to do? ‘)

return choice

In this app we will have 5 functions as our menu and maybe one or two functions to facilitate some calculations in background.

Follow me on Twitter … Click here

Python: Expenditure App

November 24, 2018 1 comment

Expenditure Application

In this post, we will go through the case study of our application.

‘ The Case’

We want to build an application to store and retrieve some data regard our expenditure, we will go as simple as two keys (date and amount), and we will save the data in a json file. So to view the data we need some functions to do some operations on the data such as Add, Delete, retrieve and change.

I will use the @pycharm to write the code and test it, but any other code editors can be used. Also, I assume we have Python and json installed in your PC.

Follow me on Twitter..

Python Project

November 23, 2018 Leave a comment

Python Project:

Two months back I start to learn #Python “Python is a #computer #programming #language “, you can say it grabbed me very quickly. I start to read some #sample #code from the net, then downloading the requirement and after 10 working days I was writing #codes in python and doing what I love Solving #mathematics puzzles with #python’.

So I decide to contribute in training or publishing python language by posting some codes block with explaining and comments, also by developing an application so we will learn on a real example.

I am publishing some codes on my Twitter (@h_ta3kees):

and I will do the same here on my blog.

The coming posts will be about the application that we will start develop I will call it ‘Expenditure App’.

Flowers Wheelbarrow

January 31, 2018 Leave a comment

Project Name: Flowers Wheelbarrow
Start Date: 7/1/2018
End Date: 24/1/2018
Working hours: 1 hours daily (not working in weekends)

Drill || Screws/Nails || Saw | Gloves || Wood || Sander or Sander paper || Measure || Pencil || Paint

Wheelbarrow Size:
You have to decide the size of the Wheelbarrow you want to build, this will give you an idea of how much wood and Nails you may need. I use a old wood pallet in my yard; the disassembling it was not easy.

Wood pallte After Disassembling

Sketches: First thing to start with..
Start with some Sketches, Here is my fast sketch of this Flowers Wheelbarrow i start with fast lines then add the measures and dimensions, the image here before the measures.

Fast Sketches of the Wheelbarrow parts

To create the wheel:
I draw a circle on a paper (diameter is important) glue it on a 2 pieces (5″ diameter, 2.5cm-thick ) wood strips from the pallet, and cut-off.

Needs more sandpaper

Wheelbarrow Side:
You need two pieces for the side, I cut the upper side in curve to give it some design.

Fixing everything: re-assembling
After fixing all parts you will get something like this, also I apply the sander machine on all the parts to make it smooth.

I am using the Dark Walnut (code: PPF-51 or #4e3d36) color.


Final looks
This is the final look of my Flowers Wheelbarrow still did not paint it, i may keep it like this.. am not sure.

Don’t throw out any remaining parts of what you are cutting, you may need it for this project or for other once.

The Bonsai experiment

December 27, 2017 3 comments

Two weeks ago I was jumping through some web pages and i come over the Bonsai trees, I like the idea and the over-all tree looks and shapes, later I fond the Bonsai kit in amazon, so i add it to my cart and 10days later I got it (International Shipping).

Now, I will start this experiment of growing a Bonsai 🙂 I will do some other posts about this project to follow up.

The Bonsai kit:


  • Plastic Bags
  • Peat plugs
  • labeling sticks
  • 6 pots
  • 3 packets of seed: (Seeds are)
    • Silver Birch (Betchula Pendula)
    • Red Maple (Acer Rubrum)
    • Mountain Pine (Pinus Mugo Pumilio)
  • instruction book

The instruction:
Ok, it was not easy to understand the instruction, I tried to simplify it into some point and I hope I am right.
1. To put the seeds in water for (24 hours)
2. Then put the compost discs in water for some time it will absorbs water it will swell.
3. Open it and put it in the pots.
4. Add the seeds to each pots. (label each pots with the date and seeds name)
5. Put the pots in the Plastic Bags for 2-3 week in cool place.
6. Then move the Plastic Bags into refrigerator for 4-6 weeks. (not sure about the points 5 and 6)
7. Now, after that the seeds should be start germinate!! so we then remove it from the bags.

This process should take 1 year before the Bonsai Tree takes it shape. I will do other post with more photos of this experiment.

Bonsai Experiment Follow-up:

Bonsai post 1 | Bonsai post 2 | Bonsai post 3 |

Another Sample for the Green Preset..

August 1, 2011 Leave a comment

Some time you may want to add more Green colors to your photos, here is a LightRoom 2 preset file that i create to do this and you can see the sample shot on the left the Yellow rose without the Green Preset filter and on the right is the same shot after applying the filter..
[Click the image to enlarge]

you can download this preset from The Download Section..