Jacob05's Posts
Nairaland Forum › Jacob05's Profile › Jacob05's Posts
1 2 3 4 5 6 7 8 ... 27 28 29 30 31 32 33 34 35 (of 37 pages)
"Hmm, java, java, java." |
The return of ultra surf Kai, Zain don Die ![]() |
Thank God o. The result is finally out. I have checked mine and my result is good !!!. |
As your lordship pleases. ![]() |
@Alexis On your lead, commander ![]() |
@E_DIPO hope you can solve the 4 question for yourself now or should i.waiting for your reply. |
My Ewurẹ {gòat} ![]()
|
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, ') |
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 |
@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 !!!. |
@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. |
@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. |
@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. |
@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. |
@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. |
@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. |
@webstar Men , i love your style .zju yot tt t t tt.we need people like you who don't just code for the main purpose of making that much money but for the fun and interesting part of it. Would like learning from you. |
@webstar when is you class starting cus am also interested in the behaviour and abilities malware. , the evil lord i heal o o o !! {joking} |
No wonder my operamini is faster than before in the past few days. ZAIN really REALLY ROCKS, |
No wonder my operamini is faster than before in the past few days. ZAIN really REALLY ROCKS, |
@dhtml Wow ! |
Best solution !!! {That was what i was thinking } |
Best solution !!! {That was what i was thinking } |
@dhtml Great , Waiting for more contributions from you. |
@nitation don't be like that good programmers think programming as fun not to make money always. @poster i can help you do these surf with python cus am just beginning C++ . If you need me you can mail me about the procedure. |
Hello world ![]() |
UpDated : NEW features: ****Ablity to Save ALL DATA ****Abilty to Load DATA ****All OOP (I Think) ![]() import time WIYF = {'jacob':'oyebanji','dipo':'elegbede','wale':'adeyemo','owolabi':'awodein','bimbo':'salami', 'taribo':'west','austin':'okocha','titi':'onafeko'} def Add_Son_And_Father(son_name,father_name): if son_name in WIYF.keys() and father_name in WIYF.values(): print"The name "+son_name.upper()+" and father "+father_name.upper()+" Already Exist" time.sleep(3) else: WIYF[(son_name).lower()] =father_name print'Your data has been added successfully!' time.sleep(3) def Replace_Name(replace_name): if replace_name in WIYF.keys(): new_dad_name = raw_input('What\'s the new father\'s name?: ') WIYF[replace_name] = new_dad_name print'Updated!' time.sleep(3) else: print "The name specified do not Exit! " time.sleep(3) def Delete_Pair(remove_name): if remove_name in WIYF.keys(): WIYF.pop(remove_name) print remove_name +" REMOVED! " time.sleep(3) else: print remove_name," DOES NOT EXIST! " time.sleep(3) def Get_Father_Name(who_are_you): if who_are_you in WIYF.keys(): print who_are_you.upper(),'you\'re a son of',WIYF[who_are_you.lower()].upper() time.sleep(3) else: print "Your Father not in List! " time.sleep(3) def Load_File(filename): try: in_file = open(filename, "r" ![]() while True: in_line = in_file.readline() if not in_line: break in_line = in_line[:-1] son, father = in_line.split("," ![]() WIYF[son] = father in_file.close() print "File Loaded Successfully !!!" time.sleep(2) except IOError: print 'Unable to Load File' time.sleep(2) def Save_List(data,filename): try: out_file = open(filename, "w" ![]() for x in data.keys(): out_file.write(x + "," + data[x] + "\n" ![]() out_file.close() print "File Saved Successfully !!!" time.sleep(3) except IOError: print 'Unable to Save File' time.sleep(2) if __name__ == '__main__': Try_Load_File() while True: print\ '''\t\tMENU ENTER 0 ----- TO EXIT ENTER 1 ----- TO ADD A SON:FATHER PAIR ENTER 2 ----- TO REPLACE A PAIR ENTER 3 ----- TO DELETE A PAIR ENTER 4 ----- TO GET YOUR FATHER'S NAME ENTER 5 ----- TO GET A LIST OF ALL FATHER:SON PAIRS ENTER 6 ----- TO GET AL NAMES OF SONS ONLY ENTER 7 ----- TO GET ALL SURNAMES ONLY ENTER 8 ----- TO SAVE ALL SON:FATHERS NAMES ENTER 9 ----- TO LOAD SON:FATHERS NAMES ''' choice = raw_input('What do you want to do?: ') if choice=='0': break elif choice == '1': own_name = raw_input('What\'s your name?: ').lower() dad_name = raw_input('What\'s your father\'s name?: ').lower() Add_Son_And_Father(own_name,dad_name) elif choice =='2': replace_name = raw_input('Which name do you wish to replace?: ').lower() Replace_Name(replace_name) elif choice == '3': remove_name = raw_input('Which name do you want to delete?: ').lower() Delete_Pair(remove_name) elif choice == '4': who_are_you = raw_input('What is your name?: ').lower() Get_Father_Name(who_are_you) elif choice == '5': print ";\n".join(["%s Son of %s" % (son.upper(),father.upper()) for son ,father in WIYF.items()]) time.sleep(3) elif choice == '6': for i in WIYF.keys(): print i.upper() time.sleep(3) elif choice =='7': for i in WIYF.values(): print i.upper() time.sleep(3) elif choice =='8': filename=raw_input("Filename To Save: " ![]() Save_List(WIYF,filename) elif choice =='9': filename=raw_input("Filename To Load: " ![]() Load_File(filename) else: print "INVALID CHOICE" print "BYE" time.sleep(3) Waiting to Ear From you All Tomorrow, MAKE I GO SLEEP OOOOOOOO. |
TRY THESE import time WIYF = {'jacob':'oyebanji','dipo':'elegbede','wale':'adeyemo','owolabi':'awodein','bimbo':'salami', 'taribo':'west','austin':'okocha','titi':'onafeko'} def Add_Son_And_Father(son_name,father_name): if son_name in WIYF.keys() and father_name in WIYF.values(): print"The name "+son_name.upper()+" and father "+father_name.upper()+" Already Exist" time.sleep(3) else: WIYF[(son_name).lower()] =father_name print'Your data has been added successfully!' time.sleep(3) if __name__ == '__main__': while True: print\ '''\t\tMENU ENTER 0 ----- TO EXIT ENTER 1 ----- TO ADD A SON:FATHER PAIR ENTER 2 ----- TO REPLACE A PAIR ENTER 3 ----- TO DELETE A PAIR ENTER 4 ----- TO GET YOUR FATHER'S NAME ENTER 5 ----- TO GET A LIST OF ALL FATHER:SON PAIRS ENTER 6 ----- TO GET AL NAMES OF SONS ONLY ENTER 7 ----- TO GET ALL SURNAMES ONLY ''' choice = raw_input('What do you want to do?: ') if choice=='0': break elif choice == '1': own_name = raw_input('What\'s your name?: ').lower() dad_name = raw_input('What\'s your father\'s name?: ').lower() Add_Son_And_Father(own_name,dad_name) elif choice =='2': replace_name = raw_input('Which name do you wish to replace?: ').lower() if replace_name in WIYF.keys(): new_dad_name = raw_input('What\'s the new father\'s name?: ') WIYF[replace_name] = new_dad_name print'Updated!' time.sleep(3) else: print "The name specified do not Exit! " time.sleep(3) elif choice == '3': remove_name = raw_input('Which name do you want to delete?: ').lower() if remove_name in WIYF.keys(): WIYF.pop(remove_name) print remove_name +" REMOVED! " time.sleep(3) else: print remove_name," DOES NOT EXIST! " time.sleep(3) elif choice == '4': who_are_you = raw_input('What is your name?: ').lower() if who_are_you in WIYF.keys(): print who_are_you.upper(),'you\'re a son of',WIYF[who_are_you.lower()].upper() time.sleep(3) else: print "Your Father not in List! " time.sleep(3) elif choice == '5': print ";\n".join(["%s Son of %s" % (son.upper(),father.upper()) for son ,father in WIYF.items()]) time.sleep(3) elif choice == '6': for i in WIYF.keys(): print i.upper() time.sleep(3) elif choice =='7': for i in WIYF.values(): print i.upper() time.sleep(3) else: print "INVALID CHOICE" time.sleep(3) print "BYE" time.sleep(3) |
@E_DIPO Sorry for not been able to reply to your questions.i was and now not able to code cus of PHCN power issues in my area . I'm Currently in need of a laptop cus these PHCN issues are getting my mad. ![]() |
@yawa-ti-de THANK GOD YOU NOT ANNOYED . CUS I HAVE MANY OF FUTURE MY FUTURE SITES AND PROGRAMS THAT YOU WILL HELP TO REVIEW. Still waiting for your ebook i requested.NOW SOMEBODY CARES ![]() |
@yawa-ti-de "masho-ree-tee" ? English ? ![]() "masho-ree-tee" kọ "Abracadabra" ni . It does amaze me of how some Nairalanders get annoyed very easyly. @TOPIC Don't get Annoyed OR Worryed if you are having a "BUG" in you program cus you still have MANY MORE BUGS TO FIX ![]() |
@E_DIPO you are welcomed @QUESTION Can't wait to get on my pc. |
1 2 3 4 5 6 7 8 ... 27 28 29 30 31 32 33 34 35 (of 37 pages)




