Re: Python Programming by Ajibel(m): 6:49pm On Aug 10, 2013 |
Bump |
Re: Python Programming by bright007(f): 8:21am On Aug 11, 2013 |
mxxpunkxx:
I happen to av a Python ebook, u will love i promise u. it's got lots of images and not boring text drop ur email ...hello,i need the ebook also. bright_silva@yahoo.com |
Re: Python Programming by nikdel: 11:25am On Oct 17, 2014 |
Pls am having problems with how to run python codes i jst installed pythoon 3.4.1 i have the python shell yet am not able run it in command line pls how do i go abt it i just joined this class today here is my mail agboolaadenike88@gmail.com |
Re: Python Programming by Nobody: 12:20pm On Oct 17, 2014 |
nikdel: Pls am having problems with how to run python codes i jst installed pythoon 3.4.1 i have the python shell yet am not able run it in command line pls how do i go abt it i just joined this class today here is my mail agboolaadenike88@gmail.com What's the error you are getting?? |
Re: Python Programming by AnnieRose: 1:03pm On Oct 17, 2014 |
Get the UNLIMITED SPC2 and SKYTECH Components for ur bulksms websites including a very fast designing, as fast as 3hrs!!! Also Available is Database Numbers Software. Call 08130623304 |
Re: Python Programming by Nobody: 12:36pm On Apr 10, 2016 |
Lemme resurrect this thread for fellow pythonistas...
Its really a Nice Thread to learn Python Programming.. |
Re: Python Programming by Ajibel(m): 1:58pm On Apr 10, 2016 |
Djangocode: Lemme resurrect this thread for fellow pythonistas...
Its really a Nice Thread to learn Python Programming.. Do you use Django atall? |
Re: Python Programming by Nobody: 5:23pm On Apr 10, 2016 |
Ajibel:
Do you use Django atall? No Bro... Am Just at Intermediate level @ Py Programming... I will start learning that when i grasp full knowledge of Python.. What about you?? |
Re: Python Programming by Ajibel(m): 6:45pm On Apr 10, 2016 |
Djangocode:
No Bro... Am Just at Intermediate level @ Py Programming... I will start learning that when i grasp full knowledge of Python..
What about you?? I'm a Django developer though. Its really scarce seeing Nigerian django developers. Most Pythonians I know of make use of PHP when it comes to web development ![sad](https://www.nairaland.com/faces/sad.png) You don't need to get the full grasp of Python before you dive into Django. I was still at the amateur level before I picked up Django. So if you are waiting to master Python first, it'll take you time. |
Re: Python Programming by Nobody: 7:01pm On Apr 10, 2016 |
Ajibel:
I'm a Django developer though. Its really scarce seeing Nigerian django developers.
Most Pythonians I know of make use of PHP when it comes to web development ![sad](https://www.nairaland.com/faces/sad.png)
You don't need to get the full grasp of Python before you dive into Django. I was still at the amateur level before I picked up Django. So if you are waiting to master Python first, it'll take you time. Thanks for the heads up... Actually, i think i overused thue word ''Intermediate'' because am still at ''Classes(OOP)''... I want to finish the ''Class'' Level and then Switch to a Framework(Django or Flask).... Any ideas on which framework that's preferable.. I heard Django is fully packed with Ammo(Batteries Included) and that Flask is just a Micro framework?? |
Re: Python Programming by Ajibel(m): 7:13pm On Apr 10, 2016 |
Djangocode:
Thanks for the heads up... Actually, i think i overused thue word ''Intermediate'' because am still at ''Classes(OOP)''...
I want to finish the ''Class'' Level and then Switch to a Framework(Django or Flask)....
Any ideas on which framework that's preferable.. I heard Django is fully packed with Ammo(Batteries Included) and that Flask is just a Micro framework?? Well, I don't get what you mean by you are still in "OOP"... Are you being taught in a school environment or on your own? I never tried Flask. I started with Django and have loved using it. And yes django is packed with lots of "contrib" apps and the beauty too is there is an active community creating 3rd party apps you can reuse for your own django project. Lemme just say that Django has its own philosophy you'll enjoy once you start learning it and by then no argument from anti-django or non-django users would convince you to dump it for another framework. |
Re: Python Programming by Nobody: 8:10pm On Apr 10, 2016 |
Ajibel:
Well, I don't get what you mean by you are still in "OOP"...
Are you being taught in a school environment or on your own?
I never tried Flask. I started with Django and have loved using it. And yes django is packed with lots of "contrib" apps and the beauty too is there is an active community creating 3rd party apps you can reuse for your own django project.
Lemme just say that Django has its own philosophy you'll enjoy once you start learning it and by then no argument from anti-django or non-django users would convince you to dump it for another framework. Wow.... Nice piece of Information... Am self-taught though, and am still tryna figure out the OOP aspect of python.. Well.. Thanks for the tips on django.. I'll quote you and ask questions from time to time in the nearby future.. |
Re: Python Programming by Ajibel(m): 8:45pm On Apr 10, 2016 |
Djangocode:
Wow.... Nice piece of Information...
Am self-taught though, and am still tryna figure out the OOP aspect of python..
Well.. Thanks for the tips on django.. I'll quote you and ask questions from time to time in the nearby future.. Yea truly, OOP in Python is quite difficult to grasp and that's because the tutorials out there don't explain it properly. So I instead use Python as a functional programming language. And that has also affected my Django path because I stuck with Function based views instead of Class based views which most people in the Django community like to use ![sad](https://www.nairaland.com/faces/sad.png) It's okay. I'll respond anytime I see your mention. Happy coding. |
Re: Python Programming by Nobody: 8:53pm On Apr 10, 2016 |
Ajibel:
Yea truly, OOP in Python is quite difficult to grasp and that's because the tutorials out there don't explain it properly.
So I instead use Python as a functional programming language. And that has also affected my Django path because I stuck with Function based views instead of Class based views which most people in the Django community like to use ![sad](https://www.nairaland.com/faces/sad.png)
It's okay. I'll respond anytime I see your mention.
Happy coding. Thanks Brova.. Do you use a Hardcopy Textbook.. I find it hard reading ebooks... I prefer Hardcopy materials... How can i get one?? Or if you use an Ebook, which ones would you recommend?? |
Re: Python Programming by jacob05(m): 9:36pm On Apr 10, 2016 |
Djangocode: Lemme resurrect this thread for fellow pythonistas... Its really a Nice Thread to learn Python Programming.. Wow.. I'm glad it has helped. This thread brings up lots of memories. |
Re: Python Programming by Nobody: 9:41pm On Apr 10, 2016 |
jacob05:
Wow.. I'm glad it has helped. This thread brings up lots of memories.
Yes Boss.. It's helped me tremendously..
I wish some things can be continued... Like deep inside python's OOP... |
Re: Python Programming by jacob05(m): 9:58pm On Apr 10, 2016 |
Djangocode:
Yes Boss.. It's helped me tremendously..
I wish some things can be continued... Like deep inside python's OOP... I trust someone would start something on that soon. ![grin](https://www.nairaland.com/faces/grin.png) @Seun |
Re: Python Programming by Nobody: 10:04pm On Apr 10, 2016 |
jacob05:
I trust someone would start something on that soon. @Seun
Well uhm, Thats like a shot in the Dark...
Can you recommend a book that handles ''Python's OOP'' effectively.. |
Re: Python Programming by jacob05(m): 10:22pm On Apr 10, 2016 |
Djangocode:
Well uhm, Thats like a shot in the Dark...
Can you recommend a book that handles ''Python's OOP'' effectively.. Bro, There are a lot of great books that discusses that in python But I like the book "Fluent Python" You can check: https://en.wikibooks.org/wiki/Python_Programming/Classes too. Check this book too "Wrox Python: Create - Modify - Reuse" Although old, It `made` a lot of sense. |
Re: Python Programming by Nobody: 11:27pm On Apr 10, 2016 |
|
Re: Python Programming by Ajibel(m): 7:47am On Apr 11, 2016 |
Djangocode:
Thanks Brova..
Do you use a Hardcopy Textbook.. I find it hard reading ebooks... I prefer Hardcopy materials... How can i get one?? Or if you use an Ebook, which ones would you recommend?? Nah, I enjoy ebooks. If you stay in Lagos, you can find hardcopy books at Ikeja computer village. I once bought a Java book there so possibly Python books would be there too. There are quite a lot of books though. The last one i read was Learning Python by Mark Lutz. Its over 1000 pages though. Beginning Python from Novice to Professional by Magnus Lie Hartland is cool too. Later when I get on pc, I'll check my pc I'll check my python folder for the tutorials I have. 1 Like |
Re: Python Programming by Nobody: 10:32am On Apr 11, 2016 |
Ajibel:
Nah, I enjoy ebooks.
If you stay in Lagos, you can find hardcopy books at Ikeja computer village. I once bought a Java book there so possibly Python books would be there too.
There are quite a lot of books though.
The last one i read was Learning Python by Mark Lutz. Its over 1000 pages though.
Beginning Python from Novice to Professional by Magnus Lie Hartland is cool too.
Later when I get on pc, I'll check my pc I'll check my python folder for the tutorials I have. Aight Bro... Thanks.. Have yu developed an app(web or desktop) with python?? |
Re: Python Programming by Ajibel(m): 12:18pm On Apr 11, 2016 |
Djangocode:
Aight Bro... Thanks..
Have yu developed an app(web or desktop) with python?? Yup (mostly with Django) but I am working on a portfolio site so once I am done, I'll upload my apps and links to my web projects on it. |
Re: Python Programming by pimplucious: 9:53pm On Sep 28, 2016 |
alexis: I haven't done anything with python on the public domain. All my work are internal to the companies I have worked for. But I can share some source code and perhaps start a short tutorial on python
PYTHON TUTORIAL
SETTING UP PYTHON
Setting up or installing python is pretty simple. Go to http://www.python.org/download/ and download the python version for your OS. I reckon most people use windows. Download the Windows installer, once the download is completed, install python as you would install any other windows application.
For other OS users i.e. Linux and MAC - most times python comes installed by default. If not, don't panic - python is a breeze to install. For linux users, it depends on the flavor you are running. For Ubuntu and debian fans, a simple apt-get install python does the trick (You have to be connected the internet). For redhat/centos fans - yum does the trick, i.e yum install python. Again you have to be connected to the Internet.
I rather you compile from source, so download tarball from python website and compile it yourself.
For MAC users, please refer to [url]http://homepages.cwi.nl/~jack/macpython/index.html[/url] for your download and install.
Now, we have have python downloaded and installed, what next? Test to see if python is working. How do you do that. For all ya unix/linux/mac users, fire up your shell/terminal and type python, hit enter. If python is installed correctly, you will enter the python interactive shell. The same works on windows, load your command prompt and type python and press enter; it should load the Python interactive shell.
Now we have python and it's interactive shell working. Oya - clap for yourself .
I hear you asking, so how do I write a python program - don't worry my dear friend because python programs are just bunch of text files saved with a .py extension. You can use your favorite text editor to write your python program but I recommend notepad++ (http://notepad-plus.sourceforge.net) for windows, textmate for MAC (http://macromates.com) or textwrangler (http://www.barebones.com/products/textwrangler/). For linux/unix, there is plain old emacs (http://www.gnu.org/software/emacs/).
So let us write our very first python program. We all know the Hello World program you see in most programming books right? Well, let's do something different. We will code python to ask for your name, your age and who was your childhood super hero. Ready?
Guess what - we can write the entire program using just 7 lines of code. So, fire-up your text editor and type in the following and save it as program1.py. Create a folder/directory anywhere on your computer and name it codes, save program1.py in it.
# A Simple program to demonstrate how easy it is to use python # Alex Dehaini - 10/10/2008
# Get name from user name = raw_input("What is your name: " #Line 1
# Get user age age = raw_input("How old are you: " #Line 2
# Ask the user for their favorite childhood super hero superhero = raw_input("\nWho is your favorite childhood super hero: " #Line 3
# Print output to the users screen
print "Hi, " + name #Line 4 print "You are", age #Line 5 print "Your childhood hero", superhero, "is very very strong" #Line 6
raw_input("\n\nPress enter to exit " #Line 7
I added several comments and lines but the actual program is just 7 line.
HOW TO RUN THE PROGRAM
Use your command prompt or terminal - go into your codes folder and type program1.py and hit enter. Enter your name, age and your favorite super hero and watch python answer you.
Don't worry if you don't understand the program for now, I will explain in subsequent post. However, the program is self-explanatory. See if you can make sense out of it.
Enjoy!
Can see you are good with python. Can u help me with tutoring? Wanna learn it |
Re: Python Programming by adejumoadeoluwa(m): 10:31am On Sep 29, 2016 |
Hello guyz we happen to have a python group, if you are Open to joining pls contact me on whatsapp (number is in my signature) |
Re: Python Programming by pimplucious: 8:53am On Sep 30, 2016 |
alexis: Let's continue our python tutorial. Let us look at the if structure today.
Using the if Structure Branching is a fundamental part of computer programming. It basically means making a decision to take one path or another. Through the if structure, your programs can branch to a section of code or just skip it, all based on how you've set things up.
Let us create a simple program that will ask you for a password & compare the password with a string.
Ready? - Oya, fire
Here is the program code for Password:
# Password # Demonstrates the if structure # Alex Dehaini - 13/11/2008
print "Welcome to Combat Jujistu Inc." print "— where combat training is our middle name\n"
password = raw_input("Enter your access code: "![wink](https://www.nairaland.com/faces/wink.png)
if password == "jujistu": print "Access Granted"
raw_input("\n\nPress the enter key to exit."![wink](https://www.nairaland.com/faces/wink.png)
Examining the if Structure The key to program Password is the if structure:
if password == "jujistu": print "Access Granted"
The if structure is pretty straightforward. You can probably figure out what's happening just by reading the code. If password is equal to "secret", then "Access Granted" is printed and the program continues to the next statement. But, if it isn't equal to "secret", the program does not print the message and continues directly to the next statement following the if structure.
Using the if-else Structure Sometimes you'll want your program to "make a choice" based on a condition: do one thing if the condition is true, do something else if it's false. The if-else structure gives you that power.
Here is the code:
# Demonstrates the if-else structure # Alex Dehaini - 13/11/2008
print "Welcome to Combat Jujistu Inc." print "— where combat training is our middle name\n"
password = raw_input("Enter your access code: "![wink](https://www.nairaland.com/faces/wink.png)
if password == "jujistu": print "Access Granted" else: print "Access Denied"
raw_input("\n\nPress the enter key to exit."![wink](https://www.nairaland.com/faces/wink.png)
Examining the else Statement I only made one change from the first program. I added an else clause to create an if-else structure:
if password == "jujistu": print "Access Granted" else: print "Access Denied"
If the value of password is equal to "secret", the program prints Access Granted, just like before. But now, thanks to the else statement, the program prints Access Denied otherwise.
In an if-else structure, you're guaranteed that exactly one of the code blocks will execute. If the condition is true, then the block immediately following the condition is executed. If the condition is false, then the block immediately after the else is executed.
Alex, I know this is long long ago, but please do u know any where in Lagos I can learn python programming? |
Re: Python Programming by melodyogonna(m): 1:36am On Oct 01, 2016 |
hello all, there's a site where you learn almost all programming languages and more like:- -digital marketing -ethical hacking -databases -penetration testing -web development -software enginerring -artificial intelligence -parallel algorithms e.t.c there is all a coding ground where you can code, copile/interprete, you can also connect to a tutor CHECK EM OUT www.tutorialspoint.com |
Re: Python Programming by adejumoadeoluwa(m): 11:42pm On Oct 03, 2016 |
hello there is a whatsapp group for python programmers, see my number in the signature if you are interested in joining |
Re: Python Programming by Sync201(m): 6:36pm On Oct 08, 2016 |
A simple program to calculate your age in days, and minutes.... Days=365 Months=12 Def days( ) : age=int(input("enter your age " ) Print("you have live for" age * Days)
Def months ( ) : age=int(input("enter your age " ) print("you have lived for" age*Months) Output >>>Days() enter your age 14 You have live for 5110 >>>Months() enter your age 14 You have lived for 16
##whats wrong with my code## 1 Like |
Re: Python Programming by havies: 10:24pm On Oct 08, 2016 |
What books do you recommend for django when using linux |
Re: Python Programming by 4kings: 10:45am On Oct 09, 2016 |
Sync201: A simple program to calculate your age in days, and minutes.... Days=365 Months=12 Def days( ) : age=int(input("enter your age " ) Print("you have live for" age * Days)
Def months ( ) : age=int(input("enter your age " ) print("you have lived for" age*Months) Output >>>Days() enter your age 14 You have live for 5110 >>>Months() enter your age 14 You have lived for 16
##whats wrong with my code## >>>Your function definition is meant to be def() not Def() >>> This: age=int(input("enter your age " )) not age=int(input("enter your age " ) ***added bracket ) >>> for this; Print("you have live for" age * Days) : it is meant to be print() not Print() and you are to use string concatenation. >>> days() not Days() and months() not Months() |
Re: Python Programming by melodyogonna(m): 9:27am On Oct 23, 2016 |
is this thread dead? |