Archive

Posts Tagged ‘Ali Hassan Radwani’

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 “expen.py” 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

Advertisements

Python : Expenditure App

November 26, 2018 2 comments



Expenditure Application


leveling the Ground:

In this post we will assume that we have a folder for our application, and we will create two files one is for our python code and we will name it “expen.py”, the other is for our data and we will name it “expen_dat.json” this file extension is ‘json’. Also I assume that we have json pack is installed in the PC so if you don’t have json this is the time to install it.

json file:After you create expen_dat.json file just open it with any text editor and copy a test data of our expenditure as shown.

{“expenditure”:
[
{“date”:”02/03/2016″,”amount”:300},
{“date”:”10/04/2016″,”amount”:550},
{“date”:”02/05/2016″,”amount”:300},
{“date”:”10/04/2016″,”amount”:550},
{“date”:”02/03/2016″,”amount”:300},
{“date”:”10/04/2016″,”amount”:550},
{“date”:”05/01/2017″,”amount”:400},
{“date”:”10/02/2017″,”amount”:400},
{“date”:”15/03/2017″,”amount”:400},
{“date”:”20/04/2017″,”amount”:400}
}]

In next post we will start with coding and testing our Expenditure Application.

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.

Photos from Qatar : The Museum of Islamic Art

February 24, 2018 Leave a comment


Photos from Qatar: The Museum of Islamic Art
A picture of The Museum of Islamic Art in Qatar, photo taken from airplane window in 2012 using Sone T100.
I take this shot with Sony T100 camera on 15/9/2012, the plane just takeoff, camera in hand.

Click here to see some photos from the Qatar Islamic Art Museum Collections

صور من قطر:صوره جوية للمتحف الاسلامي في قطر، تم التقاط الصورة من خلال شباك الطائره خلال الاقلاع سنة 2012.

My Sketchbook

October 31, 2016 Leave a comment

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.

Click to Enlarge

::SketchBook::
Sketch of: Small Elephant
Using: Ink-Pen
Date: 13.9.2015
SketchBook: SketchBook # 6
More Sketches: Click Here


Follow me on Twitter..



Inst_icon



Ali,

My Sketchbook

October 24, 2016 Leave a comment


I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.

20151001_11111801.jpg.jpeg


Click to Enlarge

::My SketchBook::
Sketch of: Small Elephant
Using: Ink-Pen
Date: 9.9.2015
SketchBook: SketchBook # 6
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

My Sketchbook

October 22, 2016 Leave a comment


I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.

20151001_11110501.jpg.jpeg


Click to Enlarge

::My SketchBook::
Sketch of: Small Chick
Using: Ink-Pen
Date: 3.9.2015
SketchBook: SketchBook # 6
More Sketches: Click Here



Follow me on Twitter..


Inst_icon




Ali,

My Sketchbook

October 18, 2016 Leave a comment

I am sketching to enhance my skill, here is one of sketches from my sketchbook using pencil as a guide-line and ink-pen to finish the drawing.

Click to Enlarge

::SketchBook::
Sketch of: Elephant
Using: Ink-Pen
Date: 24.9.2015
SketchBook: SketchBook # 4
More Sketches: Click Here


Follow me on Twitter..



Inst_icon



Ali,