Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,155,223 members, 7,825,849 topics. Date: Monday, 13 May 2024 at 02:21 AM

Let's Learn Python-striktly Noobed!! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Let's Learn Python-striktly Noobed!! (3498 Views)

Help! I Want To Learn Python Programming / Help! I Want To Learn Python / LET'S LEARN HOW TO CONTROL HOME APPLIANCES WITH SOFTWARE AND VOICE CONTROL! (2) (3) (4)

(1) (2) (3) (Reply) (Go Down)

Let's Learn Python-striktly Noobed!! by DharkPoet(m): 12:57pm On Aug 23, 2014
*Clears throat* Ever interested in learning a language, but due to certain causes, you couldn't? No PC, too complicated, seems difficult, doesn't look friendly? Well, I have been a victim of these and many other possible causes not mentioned.

So what would we be doing here? Just like the thread name, we would be learning a programming language, known as PYTHON.

Hey, get those wriggly, cold blooded constrictors out of your mind, I never referred to those Pythons. I'd be dropping a lil introduction about the language.

I'm not an expert, just someone who believes in interactive learning, so everyone is welcome, professionals expert, intermediate, beginner, noob, extreme noobs and really extreme noobs.

So please, let's adhere to the official nairaland posting rules, and also, no thread hijacking, trolling, flooding, etc. Talks about other languages are welcome, but should be streamlined and focused towards the learning process.

What better way to learn than to teach?

So why not jump in, let's get our feet wet!!
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 1:23pm On Aug 23, 2014
- REQUIREMENTS

* A PC
* Little or no programming knowledge
*Python, at least version 2.7(Not version 3)
* A Note Editor preferably Notepad++
- LEARNING TEXT
* Learn Python The Hard Way - Zed A Shaw

So you don't have a PC? or your phone can't get to read PDF files? Then you'd be needing these

- ANDROID USERS
* Download QPython
* The Learning Text above

Not using an Android?
Then:
* Check if there's a compatible Python interpreter for your mobile.
* Or Type your code in your default text pad.
* Then visit www.ideone.com
* Scroll down, click on the drop down box with different languages, select Python (not Python 3)

The learning text could be found at:
www.learnpythonthehardway.org/book/
There's also a PDF/Hard Copy version of the book for sale.

So you could definitely read ahead!!

If you can't find any of the above, lemme know.

3 Likes 1 Share

Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 1:24pm On Aug 23, 2014
So even J2ME mobile users are covered!! Let's do this!!
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 1:35pm On Aug 23, 2014
INTRO:
Python is a widely used general-purpose ,
high-level programming language. Python was conceived in the late 1980s and its implementation was started in December 1989 by Guido van Rossum at CWI in the Netherlands as a successor to
the ABC language.

The core philosophy of the language is
summarized by the document "PEP 20 (The
Zen of Python)", which includes aphorisms
such as:
* Beautiful is better than ugly
* Explicit is better than implicit
* Simple is better than complex
* Complex is better than complicated
* Readability counts

Logo below

Re: Let's Learn Python-striktly Noobed!! by Nobody: 1:36pm On Aug 23, 2014
I am in... But first question.... HTML is to web design whereas python is to what pls
Re: Let's Learn Python-striktly Noobed!! by blueyedgeek(m): 1:44pm On Aug 23, 2014
meetmonde: I am in... But first question.... HTML is to web design whereas python is to what pls
Well, python is a general purpose programming language and can be used in building web applications, mobile applications, games etc. With HTML, all you get is a static website but with python (or any other server side language), your websites become dynamic and interactive. HTML is to web design while Python is to web design on steroids.
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 2:02pm On Aug 23, 2014
Python could be used for developing Desktop apps, to server side programming, game dev, general purpose scripting, mobile development. etc
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 2:21pm On Aug 23, 2014
DEVELOPED WITH/RUNNING ON PYTHON
Google uses Python for many tasks
including the backends of web apps such as
Google Groups, Gmail , and Google Maps, as
well as for some of its search-engine
internals.

NASA is using Python to implement a
CAD/ CAE/ PDM repository and model
management, integration, and
transformation system which will be the
core infrastructure for its next-generation
collaborative engineering
environment. It is also the
development language for OpenMDAO, a
framework developed by NASA for solving
multidisciplinary design optimization
problems.

reddit was originally written in Common
Lisp, but was rewritten in Python in 2005 [6]
Yahoo! Groups uses Python "to maintain
its discussion groups" [citation needed]
YouTube uses Python "to produce
maintainable features in record times, with
a minimum of developers"

Enthought uses python as the main
language for countless custom applications
in Geophysics, Financial applications,
Astrophysics, simulations for consumer
product companies.

Disqus - Beautiful, real-time, engaging
comments threads for your
website.

Instagram - A fast, beautiful and fun photo-
sharing app for iOS and
Android.

Mozilla - Makers of Firefox, and
defenders of the openness,
innovation, and opportunity on
the web.

OpenStack - Open source software for
building private and public
clouds.

Pinterest - Pinterest is a virtual pinboard
to share beautiful things you
find on the web.
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 2:23pm On Aug 23, 2014
Any questions? Keep them coming, next stop - Python installation
Re: Let's Learn Python-striktly Noobed!! by Nobody: 2:26pm On Aug 23, 2014
I am ready, let me give you morale support at least - although i will rate as an intermediate python user sha. But for the purpose of this thread - i shall by a newbie.
Okay, I know that python is not a snake sha - so lets go there.
Re: Let's Learn Python-striktly Noobed!! by blueyedgeek(m): 2:50pm On Aug 23, 2014
DharkPoet: Any questions? Keep them coming, next stop - Python installation
Question, what are the major differences between version 2 and 3? why do you prefer 2 when 3 is the latest stable version (and the one that will be used in the future)
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 3:16pm On Aug 23, 2014
blueyedgeek: Question, what are the major differences between version 2 and 3? why do you prefer 2 when 3 is the latest stable version (and the one that will be used in the future)

The main reason for this I think, is that most python projects are running on Python 2 and there's been issues with backward compatibility, hence version 2 is still supported. Although version 2.7.x would be the last version of the 2.x series, before it's rolled into maintenance.

Anothes reason, is because of the learning text we'd be using here, all codes in it are version 2 reliant.
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 3:22pm On Aug 23, 2014
dhtml18: I am ready, let me give you morale support at least - although i will rate as an intermediate python user sha. But for the purpose of this thread - i shall by a newbie.
Okay, I know that python is not a snake sha - so lets go there.

Your seat dey for front, I see you!!
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 5:55pm On Aug 23, 2014
Been posting from mobile, would post the installation process this evening. Stay tuned!!!
Re: Let's Learn Python-striktly Noobed!! by fattbabakay(m): 7:41pm On Aug 23, 2014
*Grabs seat,sweating profusely* I was eating akpu in d hostel b4 Akpors came to tell me the lecture has commenced..Hope I'm not late ...*looks confused* Oh I left ma note in d hostel *runs out* brb!
Re: Let's Learn Python-striktly Noobed!! by Nobody: 9:20pm On Aug 23, 2014
Thank God i was first to post in case this thread actually makes it to frontpage. Last time i made first-to-post on nairaland, i was dethroned, i wish i knew the moderator, i would have punished him with one new anti-nairaland-moderator script i created (yet to test for fear of ban).

Oya lets get on with the python thing, I hear python is more powerful than PHP, armed with python and PHP, maybe I will improve and be a better programmer.
Re: Let's Learn Python-striktly Noobed!! by asalimpo(m): 9:52pm On Aug 23, 2014
Clean ur flutes noobs. You're about to charm a snake.
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 9:59pm On Aug 23, 2014
So down to installation:

Visit https://www.python.org/download/releases/2.7.8/
Get the latest Python 2.7.8 for your specific platform
For Windows, just double click on the downloaded package to initiate installation

Not a MAC User, but I'd scout the web to get the installation procedure for Mac and Linux Platforms

Boss Dhtml18, you fit still help me out with this wink wink
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 10:00pm On Aug 23, 2014
asalimpo: Clean ur flutes noobs. You're about to charm a snake.
I see you!! We 'bout to charm constrictors!!! grin grin
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 10:02pm On Aug 23, 2014
dhtml18: Thank God i was first to post in case this thread actually makes it to frontpage. Last time i made first-to-post on nairaland, i was dethroned, i wish i knew the moderator, i would have punished him with one new anti-nairaland-moderator script i created (yet to test for fear of ban).

Oya lets get on with the python thing, I hear python is more powerful than PHP, armed with python and PHP, maybe I will improve and be a better programmer.

Boss, how far Dhtmlhub? I don't mind doing these tutorials there and here!!
Re: Let's Learn Python-striktly Noobed!! by Nobody: 11:06pm On Aug 23, 2014
DharkPoet:

Boss, how far Dhtmlhub? I don't mind doing these tutorials there and here!!
That will be nice, nothing like nairaland though - by the time this thread hit frontpage, i go kill turkey and chop am quickly (for the thread) before the mod catches me.
Re: Let's Learn Python-striktly Noobed!! by Nobody: 11:23pm On Aug 23, 2014
Before I follow your thread I want you to clear me for some things.

I know Javascript nd little PHP, I know Java just learnt Android recently, though still a newbie. I want to learn some backend programming, but I have a personal beef with PHP.

I want to know what python was made BASICALLY made for Desktops Application or Web Application?
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 12:22am On Aug 24, 2014
phatjoe50: Before I follow your thread I want you to clear me for some things.

I know Javascript nd little PHP, I know Java just learnt Android recently, though still a newbie. I want to learn some backend programming, but I have a personal beef with PHP.

I want to know what python was made BASICALLY made for Desktops Application or Web Application?

Python was originally developed as a scripting language, but currently, it could be used for multi-purpose programming.

Good to know you're coming from a Java background.
Re: Let's Learn Python-striktly Noobed!! by Nobody: 3:34pm On Aug 24, 2014
Nice Thread.. I wonder why "Python" ain't in Nigeria's Universities Curriculum yet.. Its one of the most powerful languages I know.. Its simple, yet it can do high demanding jobs.. Am a Newbie tho and am enjoying every moment I spend with this Language..
Re: Let's Learn Python-striktly Noobed!! by Nobody: 4:04pm On Aug 24, 2014
Nigerian is usually backward, that is why.
Re: Let's Learn Python-striktly Noobed!! by Nobody: 6:48pm On Aug 24, 2014
dhtml18: Nigerian is usually backward, that is why.
Yeah.. Very Backward.. Pascal and Fortran is the order of the day, and worse case is that its being written on Chalk-Boards for students to cram.. Atleast with Python, one can write small real-life programs that'll enlighten him/her more on the Programming world.. I didn't attend a University, not cuz I didn't want to, buh because I couldn't afford it.. Buh everything I learned today on Programming(Python Inclusive) has been worthwhile.. Python is easy, the indentation sucks at first, buh later on, one sees the benefits due to Code Neatness and readability.. Guido Van Rossum is one of the best, not cuz am a Pythonista, its because the way he tailored down the Python Language is really "Sublime".. I encourage the OP to continue with this Thread, and am willing to Contribute.. @DHTML, DharkPoet.. Respects
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 8:01pm On Aug 24, 2014
Djangocode: Yeah.. Very Backward.. Pascal and Fortran is the order of the day, and worse case is that its being written on Chalk-Boards for students to cram.. Atleast with Python, one can write small real-life programs that'll enlighten him/her more on the Programming world.. I didn't attend a University, not cuz I didn't want to, buh because I couldn't afford it.. Buh everything I learned today on Programming(Python Inclusive) has been worthwhile.. Python is easy, the indentation sucks at first, buh later on, one sees the benefits due to Code Neatness and readability.. Guido Van Rossum is one of the best, not cuz am a Pythonista, its because the way he tailored down the Python Language is really "Sublime".. I encourage the OP to continue with this Thread, and am willing to Contribute.. @DHTML, DharkPoet.. Respects

I see you too bro!!
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 8:34pm On Aug 24, 2014
There are many ways to run python programs:
1) Via Command prompt
2) Via Windows Power Shell
3) Via IDLE (Python's IDE)

But going by the book, we"d be using option 2 - Windows Power Shell

TO OPEN WINDOWS POWER SHELL
* Click on the Windows Start Button
* Search for Windows Power Shell
* Double Click on it
* Kudos!!!, You have Power Shell running

TO RUN PYTHON
* When Windows Power Shell is open, type "Python" without quotes, hit Enter.
* You should get these lines or something identical

ActivePython 2.6.5.12 (ActiveState Software Inc.) based on
Python 2.6.5 (r265:79063, Mar 20 2010, 14:22:52) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

- If you get the above line, or something identical, (Copied the above from Zed A Shaw's Webpage), You have Python successfully installed on your machine.

- If you run python and it's not there (python is not recognized..). Install it from http://python.org/download.

- Make sure you install Python 2, not Python 3.

- You may be better off with ActiveState Python especially when you do not have Administrative rights

- If after you install it python still isn't recognized then in PowerShell enter this:

[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27", "User" )


- Close PowerShell and then start it again to make sure Python now runs. If it doesn't, restart may be required.
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 8:54pm On Aug 24, 2014
Your first Python Script

Type the below in Notepad++ exactly as it is

print "Hello World!"
print "Hello Again"
print "I like typing this."
print "This is fun."
print 'Yay! Printing.'
print "I'd much rather you 'not'."
print 'I "said" do not touch this.'


Save as ex1.py

Congrats, this is your first Python Script
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 9:01pm On Aug 24, 2014
It's recommended that a folder is created for all your Python scripts, as this would make accessibility easier as we'd get to see later as more scripts are written.

Hence, save this script as ex1.py in that folder of your choice, eg my folder of choice is lpthwe

In Power Shell, type cd (means change directory) followed by the directory of the specified folder, eg, mine is in C:\Users\Dharkpoet\lpthwe
Therefore, I'd type cd C:\Users\Dharkpoet\lpthwe

Hope you get the drift? If there are any questions, feel free to drop it.
Re: Let's Learn Python-striktly Noobed!! by DharkPoet(m): 9:06pm On Aug 24, 2014
Finally, you've written your script, of what use if you don't get to see what your script does?

So we 'run' the Python script; to do this, still in the Power Shell, type in
python ex1.py


Bam!! Bam!! That ain't magic, that's your first Python script? Feeling like Superman already? Yeah, you need to!!
Re: Let's Learn Python-striktly Noobed!! by umaryusuf(m): 9:27pm On Aug 24, 2014
DharkPoet: So down to installation:

Visit https://www.python.org/download/releases/2.7.8/
Get the latest Python 2.7.8 for your specific platform
For Windows, just double click on the downloaded package to initiate installation

Not a MAC User, but I'd scout the web to get the installation procedure for Mac and Linux Platforms

Boss Dhtml18, you fit still help me out with this wink wink

Is like you left out an important step here (of adding python PATH to system's environment variables), especially that u are using powershell to run py. It may not work on many Windows PC, which could frustrate extreme noobs...

(1) (2) (3) (Reply)

Online Banking Php Script / Learnt Web Development, What Next? (web-dev challenge) / Garage48 Winner's Idea - "A call Center Application"?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 46
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.