Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,352 members, 7,815,737 topics. Date: Thursday, 02 May 2024 at 05:22 PM

Official Thread For Experts And Begineers In Python - Programming (8) - Nairaland

Nairaland Forum / Science/Technology / Programming / Official Thread For Experts And Begineers In Python (31498 Views)

Web Programming Tutorial In Python. / How To Code Your Own Personal Assistant In Python / Official Thread For C# Experts And Beginners (2) (3) (4)

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

Re: Official Thread For Experts And Begineers In Python by Nastydroid(m): 12:59am On Nov 02, 2015
JigsawKillah:



i gotta be honest; don't know the use of 'isinstance'


cc: Nastydroid
I used it to check if number is truly a list or not,it can be use to verify if sumtin is true or not (it is different frm if and else)....i have forgotten most stuffs, I have not practice for months
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 1:03am On Nov 02, 2015
Nastydroid:
I used it to check if number is truly a list or not,it can be use to verify if sumtin is true or not (it is different frm if and else)....i have forgotten most stuffs, I have not practice for months


cool


can also write:


b = 'James'

if isinstance (b, str)


Re: Official Thread For Experts And Begineers In Python by Nastydroid(m): 1:05am On Nov 02, 2015
qidos121:
Its saying nameerror:name 'isinstance' is not defined
try wat I posted with dis instead maybe it will work let number change to names

names=["ayo","tola", "bisi"["james", "joy","aguero"["name", "python", "snake"]]]
Re: Official Thread For Experts And Begineers In Python by Nastydroid(m): 1:06am On Nov 02, 2015
JigsawKillah:



cool


can also write:


b = 'James'

if isinstance (b, str)


I can't recall, try it out if it will work we develop new skill everyday.But this won't work it doesn't look right to me

b = 'James'

if isinstance (b, str):
print (b)
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 1:08am On Nov 02, 2015
qidos121:
at all don't know any mobile developer, maybe u should create a thread for that


you know NL. . . Hardly anybody takes you under his wings without T&C lol
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 1:10am On Nov 02, 2015
Nastydroid:
I can't recall, try it out if it will work we develop new skill everyday.But this won't work it doesn't look right to me


not been on pc for a while now. . . But its been noted mentally. I'm going to do it exactly the same way you wrote the first codes only changing the int to str
Re: Official Thread For Experts And Begineers In Python by Nastydroid(m): 1:10am On Nov 02, 2015
I will reinstall my python tonight because of you guys smiley
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 1:13am On Nov 02, 2015
JigsawKillah:



you know NL. . . Hardly anybody takes you under his wings without T&C lol
true bt at least try
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 1:14am On Nov 02, 2015
JigsawKillah:



not been on pc for a while now. . . But its been noted mentally. I'm going to do it exactly the same way you wrote the first codes only changing the int to str
make i try am first
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 1:18am On Nov 02, 2015
Nastydroid:
I can't recall, try it out if it will work we develop new skill everyday.But this won't work it doesn't look right to me

b = 'James'

if isinstance (b, str):
print (b)
it worked
Re: Official Thread For Experts And Begineers In Python by Nastydroid(m): 1:23am On Nov 02, 2015
qidos121:
it worked
cool nice then
Re: Official Thread For Experts And Begineers In Python by samlexxy: 6:09am On Nov 02, 2015
i love the spirit of this forum...let's keep the ball rolling...
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 7:14am On Nov 02, 2015
qidos121:
it worked

cool! I've been looking for something of this sort for a while.
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 10:28am On Nov 02, 2015
please quote and say wich ide u are using
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 10:29am On Nov 02, 2015
JigsawKillah:



cool! I've been looking for something of this sort for a while.
sori to ask bt wat do u want to apply it to
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 11:13am On Nov 02, 2015
qidos121:
sori to ask bt wat do u want to apply it to


tired of error messages each time i write some certain codes. Sometimes, there are programs meant for strings and strings only.
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 12:51pm On Nov 02, 2015
JigsawKillah:



tired of error messages each time i write some certain codes. Sometimes, there are programs meant for strings and strings only.
thats d beauty of problem solving
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 7:24pm On Nov 03, 2015
Jigsawkillah, donifez, nastydroid, samlexxy, una wan kill the spirit of this group, Guido Van Rosum no go gree for una.............make una do this one, write an app dat determines if a no is an odd or even no..........
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 8:46pm On Nov 03, 2015
qidos121:
Jigsawkillah, donifez, nastydroid, samlexxy, una wan kill the spirit of this group, Guido Van Rosum no go gree for una.............make una do this one, write an app dat determines if a no is an odd or even no..........


nom = int(input('Input your number: ')

if nom % 2 == 0:
........print ('your number is an even one')
elif: nom % 2 != 0:
........print ('your number is an odd one')
else:
........pass
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 11:35pm On Nov 03, 2015
JigsawKillah:



nom = int(input('Input your number: ')

if nom % 2 == 0:
........print ('your number is an even one')
elif: nom % 2 != 0:
........print ('your number is an odd one')
else:
........pass
oya help me solve this 2. Dey av suceded in scatering my head ..... Encapsulate***** 1 f r u i t = " banana " 2 coun t = 0 3 for c har in fruit : 4 if char == " a " : 5 coun t += 1 p r i n t ( count ) ******in a function named c oun t _ l e t t e r s, and generalize it so that it accepts the string and
the letter as arguments. Make the function
return the number of characters, rather than
print the answer. The caller should do the
printing. (the following is the second question). Now rewrite the c oun t _ l e t t e r s function so that instead of traversing the string, it
repeatedly calls the f i nd method, with the optional third parameter to locate new
occurrences of the letter being counted.
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 11:44pm On Nov 03, 2015
qidos121:
oya help me solve this 2. Dey av suceded in scatering my head ..... Encapsulate***** 1 f r u i t = " banana " 2 coun t = 0 3 for c har in fruit : 4 if char == " a " : 5 coun t += 1 p r i n t ( count ) ******in a function named c oun t _ l e t t e r s, and generalize it so that it accepts the string and
the letter as arguments. Make the function
return the number of characters, rather than
print the answer. The caller should do the
printing. (the following is the second question). Now rewrite the c oun t _ l e t t e r s function so that instead of traversing the string, it
repeatedly calls the f i nd method, with the optional third parameter to locate new
occurrences of the letter being counted.


please space this, i don't understand any bit of it.
Re: Official Thread For Experts And Begineers In Python by dguyindcorner(m): 12:38pm On Nov 05, 2015
umaryusuf:
If you haven't been added yet, put ur number in { }. Example: {08055...}

{08137055771}

add pls
Re: Official Thread For Experts And Begineers In Python by dguyindcorner(m): 12:40pm On Nov 05, 2015
Nastydroid:
I will reinstall my python tonight because of you guys smiley

Long time padi :p
Re: Official Thread For Experts And Begineers In Python by Nastydroid(m): 1:39pm On Nov 05, 2015
dguyindcorner:


Long time padi :p
how have you being bro,no one is active in the group anymore smiley
Re: Official Thread For Experts And Begineers In Python by dguyindcorner(m): 3:01pm On Nov 05, 2015
Nastydroid:
how have you being bro,no one is active in the group anymore smiley

Abi o. Too much activities and different phones.

PM me on Whatsapp brother
Re: Official Thread For Experts And Begineers In Python by omoelu1(m): 3:41pm On Nov 05, 2015
JigsawKillah:




this didn't actually work. . . I think i tried something of this sort. Somewhere, the IF doesn't fit
i hope i'm not coming in too late, try it this way:

numbers = [1, 2, 3, [4, 5, 6], 10]

for num in numbers:
if isinstance(num, list):
for nested_list in num:
print nested_list
else:
print num


i have tried to format it properly

1 Like

Re: Official Thread For Experts And Begineers In Python by Nastydroid(m): 4:51pm On Nov 05, 2015
dguyindcorner:


Abi o. Too much activities and different phones.

PM me on Whatsapp brother
roger that
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 10:33pm On Nov 06, 2015
So people i wanted to ask whats the difference between the software market in nigeria and america .. Please share thoughts
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 10:51pm On Nov 06, 2015
qidos121:
So people i wanted to ask whats the difference between the software market in nigeria and america .. Please share thoughts


it's the same difference between sneakers in America and sneakers in Nigeria.

We tend to consider foreign products superior to ours.
Re: Official Thread For Experts And Begineers In Python by qidos121(m): 6:00am On Nov 07, 2015
JigsawKillah:



it's the same difference between sneakers in America and sneakers in Nigeria.

We tend to consider foreign products superior to ours.
but why, there has to be a reason
Re: Official Thread For Experts And Begineers In Python by JigsawKillah(m): 7:17am On Nov 07, 2015
qidos121:
but why, there has to be a reason

they're more advanced in technology than us. They value their techs.
But i have a feeling that this might change in Nigeria.
Re: Official Thread For Experts And Begineers In Python by julybaba(m): 6:55pm On Nov 07, 2015
Please add me o. 08162999776

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

Nigerian Teen Girls Win International Award With Their Waste Disposal App / Difference Between A Programmer And A Web Developer? / Any Way To Stop Palmpay Security Plugin On A Phone

(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. 30
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.