₦airaland Forum

Welcome, Guest: Join Nairaland / LOGIN! / Trending / Recent / New
Stats: 2,317,735 members, 5,108,910 topics. Date: Wednesday, 21 August 2019 at 11:28 PM

Python Programming - Programming (4) - Nairaland

Nairaland Forum / Science/Technology / Programming / Python Programming (46706 Views)

Anyone That Know Python Programming Should Help Me To Check The Eorr This / Support Python Programming With Android Devices :qpython E.t.c / What Can Python Programming Language Build? (2) (3) (4)

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (14) (Reply) (Go Down)

Re: Python Programming by Nobody: 3:05am On Feb 13, 2009
WIYF = {'jacob':'oyebanji','dipo':'elegbede','wale':'adeyemo','owolabi':'awodein','bimbo':'salami',
        'taribo':'west','austin':'okocha','titi':'onafeko'}

That format is what is called json (javascript object notation) - i am surprised it is in python too - a very smart way to represent arrays with keys and values.

I am currently downloading the windows msi - i will be back later - thanks for the support guys.
Re: Python Programming by jacob05(m): 2:56pm On Feb 13, 2009
@dhtml
Great , Waiting for more contributions from you.
Re: Python Programming by Nobody: 9:46pm On Feb 13, 2009
Once i am done with these hello world stuffs, i will try see if i can rewrite some of my simple c/c++ programs in python - that is what i alwayz do each time i learn a new lang - before i start doing serious business with it.
Re: Python Programming by jacob05(m): 12:31am On Feb 14, 2009
@dhtml
Wow ! shocked , What a coincidence ,i am also beginning C++ and i have been able to compile and run few of my "hello world" python programs and what amaze me most about c++ is it speed at compiling scripts into executable programs .
Re: Python Programming by Nobody: 12:48am On Feb 14, 2009
Yeah right, no problem, since you have a head start, maybe i will be asking you questions when i am stuck.
Re: Python Programming by EDIPO(m): 2:05pm On Feb 16, 2009
@Jacob05

thanks for the code sent. i ran it and it worked well but i have a comment on the code.
when choice == '1', it takes both name and father's name and adds it to the database, i noticed that it was replacing the names that already existed.

for instance, i tried adding another 'dipo' with surname 'hussein' and it replaced the ' dipo son of elegbede' that came with the defined dictionary.
can you please look thru and let me know what's up?

second, i have problems with the topics,'creating functions and classes' and also how to call both.
particularly, an instance from your code, if __name__ = __main__!
such things kinda scare me and its not making me go forward with my reading.

please reach out.
Re: Python Programming by EDIPO(m): 2:26pm On Feb 16, 2009
jac

the other code that had lots of functions defined from the beginning came with this error:

Traceback (most recent call last):
File "C:/python4beginnersprac/wiyf2.py", line 66, in -toplevel-
Try_Load_File()
NameError: name 'Try_Load_File' is not defined.

i have not really gone thru it as i copies and ran while browsing.
i would go home and read thru again and see if i can come up with anything.

kindly look thru from your end as well.

please can we schedule a tutorial online. i think i need some guidance now more than ever if i would be good @ python.

thanks man.
Re: Python Programming by jacob05(m): 5:26pm On Feb 16, 2009
@E_DIPO
you replied atlast.
@ERROR
remove Try_Load_file() line in the script.when i was writing this second code i had multiple choices to choose from , i thinking of the script automatically loading a default file in which all data is saved in But i concluded on you loading the file manually.Sorry for the small error. I will post the other solutions latter on.
Re: Python Programming by jacob05(m): 5:26pm On Feb 16, 2009
@E_DIPO
you replied atlast.
@ERROR
remove Try_Load_file() line in the script.when i was writing this second code i had multiple choices to choose from , i thinking of the script automatically loading a default file in which all data is saved in But i concluded on you loading the file manually.Sorry for the small error. I will post the other solutions latter on.
Re: Python Programming by jacob05(m): 5:27pm On Feb 16, 2009
@E_DIPO
you replied atlast.
@ERROR
remove Try_Load_file() line in the script.when i was writing this second code i had multiple choices to choose from , i thinking of the script automatically loading a default file in which all data is saved in But i concluded on you loading the file manually.Sorry for the small error. I will post the other solutions latter on.
Re: Python Programming by EDIPO(m): 5:19pm On Feb 17, 2009
@ Jacob05,

i will do that as soon as i return to my assignment later today. thanks.

you did not mention anything about the topics i raeised and the tutorial issue i started.

please lets look at it and see what we can arrange.

thanks.
Re: Python Programming by jacob05(m): 7:00pm On Feb 17, 2009
@E_DIPO
you CAN ask any question or request for any tutorial on this thread remember this thread is for "PYTHON".
And about the tutorial you requested, i don't think am that "Smart" or "Good" enough to teach you python. i can only try and solve few of your coding problems , am also a beginner in programming .webdezzi may be of help.
Re: Python Programming by jacob05(m): 7:01pm On Feb 17, 2009
@E_DIPO
you CAN ask any question or request for any tutorial on this thread remember this thread is for "PYTHON".
And about the tutorial you requested, i don't think am that "Smart" or "Good" enough to teach you python. i can only try and solve few of your coding problems , am also a beginner in programming .webdezzi may be of help.
Re: Python Programming by jacob05(m): 7:03pm On Feb 17, 2009
@E_DIPO
you CAN ask any question or request for any tutorial on this thread remember this thread is for "PYTHON".
And about the tutorial you requested, i don't think am that "Smart" or "Good" enough to teach you python. i can only try and solve few of your coding problems , am also a beginner in programming .webdezzi may be of help.
Re: Python Programming by Omoosedabi: 3:47pm On Feb 18, 2009
Python
Re: Python Programming by Omoosedabi: 3:49pm On Feb 18, 2009
I am planning to learn php.do u tink i Python offers wat php gives @all
Re: Python Programming by EDIPO(m): 12:37pm On Feb 19, 2009
@ Jacobs05,

no sweat bro, it's all good and i feel everybody would learn if it's all done here.
can you pls send the other solutions.

i still do not think or better put, agree that you can not teach me. there are certain codes you have written that tells me you are better than i am.
just teach me the little ones you know more that me and i would be grateful for that. you do not need to be a whiz to teach. as far as python is concerned, every concept learnt, is a concept gained.

look at those topics again and please help, come outta you shell.

@ webdezzi

please would you mind teaching me certain aspects in pyto.

thank you.
Re: Python Programming by Nobody: 12:55pm On Feb 19, 2009
it appears you've got solutions to ur problem @jacob

@omoosedabi

i will advice you stick to php if it is for the web. For a newbie, you will get help easily.

Python is easier though.

imagine this

f=open("test.txt","w"wink
f.write("this is a test file"wink
f.close()

those lines will create a file named test.txt and put "this is a test file" inside it
python is THAT simple

php might look somthing like this.

$f=fopen("test.txt","w"wink;
fwrite($f, "this is a test file"wink;
fclose($f);

PHP has more syntax compared to python you dont need semicolons and the dollar signs in python.
just indentation, and i makes the python code easier to read. python can turn out to be ur answered prayers if you are into software development, too much free modules
Re: Python Programming by jacob05(m): 7:48pm On Feb 19, 2009
@webdezzi
what problem ?
@E_DIPO
i have solved them but am not able to connect to the internet on pc{am currently on phone}. Zain is becoming crowded !!!.
Re: Python Programming by jacob05(m): 8:52pm On Feb 19, 2009
Solution 1

import random
Words=['dipo','elegbede','wale','adeyemo','owolabi','awodein','bimbo','salami',
'taribo','west','austin','okocha','titi','onafeko']
rand_list=random.sample(Words,len(Words))
for i in rand_list:
print i
Re: Python Programming by jacob05(m): 9:31pm On Feb 19, 2009
solution 5

import random
trys=0
guess=''
Words=['dipo','elegbede','wale','adeyemo','owolabi','awodein','bimbo','salami',
'taribo','west','austin','okocha','titi','onafeko']
rand_word=random.sample(Words,1)[-1]
print '-'*40,'\n',' |','Welcome to This Guess Program','|\n','-'*40
print 'I am Thinking of a word, The word as ',len(rand_word),' letters\n'
print 'You Have Five Chances to Check if a letter in The word ,And That YOU ARE ON YOUR OWN'
while guess not in (rand_word,'exit'):
while trys < 5:
print 'Trys =',trys
letter=raw_input('Enter a Letter to Check >> ').lower()
if len(letter) ==1:
if letter in rand_word:
print 'Yes'
trys+=1
else:
print 'No'
trys+=1
else:
print 'Letters Only !!!'
trys+=1
print 'Now You Are on Your Own'
guess=raw_input('What is the Word i\'am Thinking of >> ').lower()
if guess != rand_word:
print random.choice(['Nope','No','Rara O !!','Nba'])
else:
break
if guess == rand_word:
print 'YES !!! The Word i was Thinking of is',rand_word
raw_input('Enter Any Key To Exit, ')
else:
print 'The Word i was Thinking of is',rand_word
raw_input('Enter Any Key To Exit, ')
Re: Python Programming by jacob05(m): 1:05pm On Feb 20, 2009
@E_DIPO
hope you can solve the 4 question for yourself now or should i.waiting for your reply.
Re: Python Programming by paule: 1:39pm On Feb 20, 2009
Guys what are still doing with python (do you want the snake to bit or swallow you?) come over to Java or dotnet
Re: Python Programming by alexis(m): 6:36pm On Feb 20, 2009
Why go over to dotnet or java when python can do and do it easily?
Re: Python Programming by alexis(m): 6:45pm On Feb 20, 2009
Let us do something with python - a project. Something that can teach every aspect of python. I pray I don't get missing again, smiley
Re: Python Programming by jacob05(m): 7:01pm On Feb 20, 2009
@Alexis
On your lead, commander grin
Re: Python Programming by alexis(m): 7:27pm On Feb 20, 2009
let us discuss it & we should allow others to contribute. what do you think?
Re: Python Programming by jacob05(m): 10:13pm On Feb 20, 2009
As your lordship pleases.grin
Re: Python Programming by ack: 12:47am On Feb 28, 2009
If you're into python, visit irc://irc.freenode.org #python-ng -- It's an empty channel that I decided to start up if people are interested in this sort of thing smiley
Re: Python Programming by jacob05(m): 10:31am On Mar 03, 2009
irc:
print "hello world"
Re: Python Programming by jacob05(m): 4:52pm On Mar 04, 2009
WONDERING WHEN SOMEONE WOULD START A PYTHON TUTORIAL .
Re: Python Programming by worldbest(m): 3:11am On Mar 05, 2009
Python is a really nice language.Built my web crawler with it.

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (14) (Reply)

Game Development: Join The Team / For Computer Science Students / Project Topics In Computer Science

(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: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9)

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