Jacob05's Posts
Nairaland Forum › Jacob05's Profile › Jacob05's Posts
1 2 3 4 5 6 7 8 ... 33 34 35 36 37 (of 37 pages)
Java sucks ![]() PYTHON RULES ![]() |
Meaning: e don finish ![]() |
Meaning: e don finish ![]() |
@POSTER Don't mind toluxa1 PYTHON is also a very powerful programming language which can do most things is so call JAVA can do and do it prefectly and you can write codes in python 5 times shorter than java and produce thesame result. It don't matter about the programming language you are using what matters is the "PRODUCTIVITY" which i believe python is. And about the FB thing it as lead me to the creation of my first two programs (I am a beginner ) first is the MTN trick download converter with help me to download files on my pc which made the mtn @ trick download url to download files by removing the google.com/gwt/n?u=http:// and replacing some google codes like %2f which is /. Second is my desktop file manager which came about when i am having problems with too much downloaded files on my desktop and i have to move each downloaded file format to a specific folder and it as helped me alot in managing my desktop to see the source code go to programming challenge thread. |
Well it seems no body is willing to answer my question well i reveal my source code in PYTHON PROGRAMMING LANGUAGEbut this file manager suchs for '.txt','.py','.doc','.java','.pdf','.htm' and suchs the Desktop i created this Desktop manager as a result of a problem of having too much files on my desktop since all my internet downloads are downloaded on desktop and i made it a challenge for myself not to manually move all the desktop files since they are many and different file format so that bring about these my desktop manager. import os import shutil print '*******WELCOME TO THESE POWERFUL Desktop Manager*******' folder='D:\Documents and Settings\OYEBANJI\Desktop' os.chdir(folder) cwd=os.getcwd() print '******* Current Direntory is '+cwd+' ********' for treedir in ('DesktopHTM_FILES','DesktopPAGES','DesktopTEXT','DesktopPYTHON','DesktopJAVA','DesktopPDF','DesktopDOC'): if treedir in os.listdir(cwd): print '*****PATH '+ treedir + ' Already Exist****' if treedir not in os.listdir(cwd): print '**** Creating '+ treedir+' Direntory*****' os.mkdir(treedir) print "***** PATH CREATED ******" files=[] for i in ('.txt','.py','.doc','.java','.pdf','.htm'): for filename in os.listdir(folder): if filename.find(i)>-1: files+=[folder + "\\" + filename] if len(files) > 0: for filename in files: if os.path.splitext(filename)[1].upper()[1:]== 'HTM' or 'HTML': j = os.path.split(filename)[1] if j in os.listdir('DesktopHTM_FILES'): print j +' Already in '+ 'DesktopHTM_FILES' if j not in os.listdir('DesktopHTM_FILES'): q = shutil.move(filename,'DesktopHTM_FILES') print "*** MOVED " + filename + " TO " + 'DesktopHTM_FILES' if os.path.splitext(filename)[1].upper()[1:]== 'TXT': j = os.path.split(filename)[1] if j in os.listdir('DesktopTEXT'): print j +' Already in '+ 'DesktopTEXT' if j not in os.listdir('DesktopTEXT'): q = shutil.move(filename,'DesktopTEXT') print "*** MOVED " + filename + " TO " + 'DesktopTEXT' if os.path.splitext(filename)[1].upper()[1:]== 'PY': j = os.path.split(filename)[1] if j in os.listdir('DesktopPYTHON'): print j +' Already in '+ 'DesktopPYTHON' if j not in os.listdir('DesktopPYTHON'): q = shutil.move(filename,'DesktopPYTHON') print "*** MOVED " + filename + " TO " + 'DesktopPYTHON' if os.path.splitext(filename)[1].upper()[1:]== 'JAVA': j = os.path.split(filename)[1] if j in os.listdir('DesktopJAVA'): print j +' Already in '+ 'DesktopJAVA' if j not in os.listdir('DesktopJAVA'): q = shutil.move(filename,'DesktopJAVA') print "*** MOVED " + filename + " TO " + 'DesktopJAVA' if os.path.splitext(filename)[1].upper()[1:]== 'PDF': j = os.path.split(filename)[1] if j in os.listdir('DesktopPDF'): print j +' Already in '+ 'DesktopPDF' if j not in os.listdir('DesktopPDF'): q = shutil.move(filename,'DesktopPDF') print "*** MOVED " + filename + " TO " + 'DesktopPDF' if os.path.splitext(filename)[1].upper()[1:]== 'DOC': j = os.path.split(filename)[1] if j in os.listdir('DesktopDOC'): print j +' Already in '+ 'DesktopDOC' if j not in os.listdir('DesktopDOC'): q = shutil.move(filename,'DesktopDOC') print "*** MOVED " + filename + " TO " + 'DesktopDOC' raw_input('ENTER ANY KEY TO EXIT> ') if len(files) < 1: print 'No File FOUND' raw_input('ENTER ANY KEY TO EXIT> ') #print filename |
solution 2 a=int(raw_input("enter score: " )) if 59 < a > 100 : print " Input Greater Than 100 or Input Less the 60" else: if a in range(90,101): print " Your Grade is A" if a in range(80,90): print "Your Grade is B " if a in range(70,80): print "Your Grade is C" if a in range(61, 70): print "Your Grade is D" if a==60: print "Your Grade is F" |
solution 2 a=int(raw_input("enter score: " )) if 59 < a > 100 : print " Input Greater Than 100 or Input Less the 60" else: if a in range(90,101): print " Your Grade is A" if a in range(80,90): print "Your Grade is B " if a in range(70,80): print "Your Grade is C" if a in range(61, 70): print "Your Grade is D" if a==60: print "Your Grade is F" |
Solution (CORRECT) a=input("enter score: " ) grade={5:'A',4:'B',3:'C',2:'D',1:'E',0:'F'} if a > 5: print 'Out of Grade Range' else: B=grade[a] print B i will be solving the other one's later |
Hi to all am jacob and am 17 with a bit of programming experience that i have i think i can solve all your questions Solution 1 a=input("enter score: " ) grade=[5:A,4:B,3:C,2 ,1:E,0:F]B=grade.keys(a) print B pardon me if these is not correct or properly stated cos am using my phone(free browsing) if it isn't correct it might be the area of B=grade.keys(a) i will revise when i get on my pc |
Hi to all am jacob and am 17 with a bit of programming experience that i have i think i can solve all your questions Solution 1 a=input("enter score: " ) grade=[5:A,4:B,3:C,2 ,1:E,0:F]B=grade.keys(a) print B pardon me if these is not correct or properly stated cos am using my phone(free browsing) if it isn't correct it might be the area of B=grade.keys(a) i will revise when i get on my pc |
Hi nairalanders, am jacob a beginner in python programming language. I want this thread to be a of source competition or challenge in which a user post a question (which he or she can and have solve) and wait for answers from other posters and after the question is answered he reveal the source code and if the question again is not answered in TWO WEEKS he reveal the answer. NOTE: The question can be solved with any programming language sofar as the answer is correct and multiple answers are also allowed. First challenge: Create a file manager that searches a given system location for .mp3,.pdf,.zip,.doc,.txt,.html,.java,.py,.php,.jar files and extract the files from the given location and create folders to save each seperate file format in location of your choice.FINISH:-) simple Well like i have said earlier i am a beginner and i am not to ask hard questions that i can't solve. And forever me of how this post is written becausei am using my phone(free browse). SO GOOD LUCK TO YOU ALL |
Using Zain With Opera:create An Access Point By Going To Settings-->config-->presonal Config --> add new --> access point NOTE:DON'T CHOOSE WEB CAUSE APP'S{OPERA} CONNECT WITH ACCESS POINT After that put the zain trick:apn:mms.ng.zain.com user&pass:mms DONE! |
>>>print "Hello, World" >>> print "Has any body tried his or her hands in python and what are your experiences and views using it" |
at want cost can i use this services or is it free with no charge ![]() |

well i reveal my source code in PYTHON PROGRAMMING LANGUAGE
,1:E,0:F]
Well like i have said earlier i am a beginner and i am not to ask hard questions that i can't solve. And forever me of how this post is written because