Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,143,480 members, 7,781,407 topics. Date: Friday, 29 March 2024 at 01:58 PM |
Nairaland Forum / Gbolly1151's Profile / Gbolly1151's Posts
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (of 16 pages)
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 2:15am On Apr 18, 2020 |
For anyone interested in learning python from scratch you can pm me on 07060435624 hourly payment based,so you can quickly option out. |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 2:04am On Apr 18, 2020 |
When you use return keyword,it actually return a value and STOP the function, therefore if you have two return keywords in a function only one will work based on the condition usually if/else statement. therefore avoid use of if/else statment this way
|
Programming / Re: Tutorial: Object Oriented Programming Paradigm For Beginners in Python by gbolly1151(m): 1:10pm On Apr 16, 2020 |
A lion is a species with a short,rounded head, a reduced neck,round ears, and a hairy tuft at the end of its tail. It has prominent mane,which is the most recognisable feature of the species. They can run,jump and do hunt prey. Who is following? |
Programming / Re: Tutorial: Object Oriented Programming Paradigm For Beginners in Python by gbolly1151(m): 10:19am On Apr 16, 2020 |
I will post some description and will like you guys to write the class structure in this way before will move to next topic in inheritance
|
Programming / Re: Tutorial: Object Oriented Programming Paradigm For Beginners in Python by gbolly1151(m): 9:51pm On Apr 14, 2020 |
koyla:You are welcome sir |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 7:38pm On Apr 14, 2020 |
I have started another thread,you can follow Tutorial: Object Oriented Programming Paradigm For Beginners |
Programming / Re: Tutorial: Object Oriented Programming Paradigm For Beginners in Python by gbolly1151(m): 7:26pm On Apr 14, 2020 |
koyla:Posted now |
Programming / Re: Tutorial: Object Oriented Programming Paradigm For Beginners in Python by gbolly1151(m): 7:26pm On Apr 14, 2020 |
Now let me write description of a dog,this will be the basis from which we will learn OOP DESCRIPTION OF A DOG OOP is a programming paradigm that deal with object and class relationship... That statement look too complex to me so am going to break it down in a way we can quickly grab What is an object? Object is anything you can describe e.g the above is the description about Dog,therefore Dog is an object. Noun is an object i.e any name of animal,place or things... Lol i prefer that definition to naming words.other example of object are man,woman,Hausa,pen,pencil, shoe What is a class? Class refer to the framework of an object or noun,in order word what object is made up, it composed of 3 part; 1.name - this is general name of object,that share 'am a', 'is a' or 'is an' relationship with an object e.g1 man is a person,woman is a person. Person is the class name. e.g2 Hausa is a tribe,Youruba is a tribe,Igbo is a tribe. Tribe is the class name In the above description of a dog,we say Dog is an Animal. Animal is the class name 2.Attribute - this hold information about an object,that share 'is' or 'has' relationship with the value e.g it has 4 leg(information about leg),it is fat(information about body) . Look at those statement we can rewrite those as Dog legs is 4, Dog body is fat. The attribute is legs and value is 4. I.e legs=4 The second attribute is body and value is fat i.e body ='fat' 3.method - this tell us about the ability of the object,what the object 'can' do or 'will' do,it is the function the object will perform in the system. From the description of a dog,its abilities are; It can bark,it can bite,it can run Method are bark(),bite(),run() Now let us decrypt that description of Dog to form a class for object Dog
Just snack to chop, write a description about yourself and write out the class name,attribute and method |
Programming / Tutorial: Object Oriented Programming Paradigm For Beginners in Python by gbolly1151(m): 5:48pm On Apr 14, 2020 |
Hello Nairalands,this was demanded from my thread "common python programming practice". So in this thread,i will try as much as possible to make OOP understandable for anyone who want to learn it. So stay tune as the tutorial will be coming |
Health / Re: 20 New Cases Of Coronavirus In Nigeria. Total 343. 91 Discharged. 10 Deaths by gbolly1151(m): 10:21pm On Apr 13, 2020 |
Still wondering why our aboki got low count,am not sure they are investigating that region wella |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 8:56pm On Apr 12, 2020 |
HOW TO GENERATE ENGLISH ALPHABET The keyword for this task is chr() which take in number as argument and return equivalent character. E g chr(97) return 'a',with this we can generate our 26 English alphabet
For capital letters start from 65 1 Like 1 Share |
Health / Re: Francis Faduyile: We Are Not Going To Meet Or Interact With Chinese Medical Team by gbolly1151(m): 7:38am On Apr 12, 2020 |
Inviting Chinese doctor is unethical true,but the Govt themselves know that they haven't improve both education and medical sector which will post a serious danger on them when they are infected with this covid virus. This is just an alternative to flying out of the country for treatment. Those stupid Govt understand their motive. 16 Likes |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 3:15pm On Apr 09, 2020 |
Tip for learning software development Pick up python design patterns and learn |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 12:24pm On Apr 09, 2020 |
Try and Except keyword This is a wonderful keyword for controlling error output in python. for example: on a norm,dividing a number by 0(zero) is mathematical error,so if you try to divide 2//0 in python,an awful error will be printed out like this below,which cant be easily understood by user.
using Try and except keyword, you can control the output and print out your desire output let create two functions for out zero division error; 1.with try and except 2.without try and except
below pic show that,div1() give a nice output to the console than div2() thanks to try and except for the job 1 Share
|
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 12:24pm On Apr 09, 2020 |
Playforkeeps:True...i am hoping to create a Nigerian forum for it |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 7:58am On Apr 09, 2020 |
Playforkeeps:Nice one |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 9:05pm On Apr 06, 2020 |
locust: Those tips are advance anyway but i will advice you to pick up on one and learn,master it,then you can move on easily with other programing language. |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 7:06pm On Apr 06, 2020 |
locust:Which part and are you just learning python? |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 11:18pm On Apr 05, 2020 |
Difference between yield and return i will explain generator before going into yeild and return; generator is a class that help to transform any object to work with iter() and next() Now what are yield and return? Both keywords are used in returning value from a function but in different ways, yield 1) release a generator object that called iter() method i.e (yield = return genertor(object).__iter__()) and also 2) pause a function(it keep the state of function),then resume action when next() is called return only help to terminate a function and release a value. '''
1 Share
|
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 5:31pm On Apr 04, 2020 |
iter() and next() KEYWORD Iter() - is just used to make an object iterable,iterable objects are use for forloop operation. this keyword call __iter__() method from the object, if not available then it throw error next() - this keyword is use to access __next__() method of the object inbuit data type that has this method are list,dictionary,set and tuple With that you can make your class iterable e.g let create a data type that return reverse of the any string
2 Likes 1 Share |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 6:27pm On Apr 02, 2020 |
TIP TO LEARN OOP To master OBJECT ORIENTED PROGRAMMING (OOP) start with CLASS DIAGRAM in UNIFIED MODELING LANGUAGE (UML),it will really help to know relationship between classes and make code writing easy. 1 Like 1 Share |
Programming / Re: Common good python programming practices you should know by gbolly1151(m): 4:49pm On Apr 01, 2020 |
CONDITIONAL EXPRESSION conditional expression help to assign a value to a variable based on a given condition. the syntax is var=expr1 if condition else expr2
|
Programming / Re: Share Your Road map To Becoming A Web Developer. by gbolly1151(m): 1:43am On Apr 01, 2020 |
Samcent: Thanks for your advice sir,i will keep to it |
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (of 16 pages)
(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. 57 |