Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,547 members, 7,812,728 topics. Date: Monday, 29 April 2024 at 06:12 PM

A Thread For Tutorial On Python Programming - Programming (24) - Nairaland

Nairaland Forum / Science/Technology / Programming / A Thread For Tutorial On Python Programming (140305 Views)

Opportunity To Earn Little Pay Working On Python Assignment. / I want to solve question on python basic / I Have A Very Import Question On Python Syntax (2) (3) (4)

(1) (2) (3) ... (21) (22) (23) (24) (25) (26) (27) ... (32) (Reply) (Go Down)

Re: A Thread For Tutorial On Python Programming by SirJerrie(m): 3:37pm On Oct 03, 2020
Finally...A python community on Nairaland!!!
Hello to the Ogas in the house and fellow python enthusiasts ...
So I started my python journey last 4 months with Automate The Boring Stuff With Python
then I moved to Zero to Hero with python by Jose portila...
I FEEL LIKE I'M NOT PROGRESSING
After 4 months of being on python I haven't atill gotten to the level I thought I'd be at...
I see people who say they learnt it under a month...at most 2 months. And rhey were able to write cool programs with it.
But I seem to get it right..like I'm stuck.



I'd like to know if theres something I'm not doing right?..
For those of you that are proficient with python, what was your journey like??
How long did it take you to get to where you currently are with python??
Re: A Thread For Tutorial On Python Programming by avalon7(m): 1:13pm On Oct 04, 2020
shgenius123:
I'll need this. thanks in advance

Where do you stay?
Re: A Thread For Tutorial On Python Programming by Towbaba500(m): 1:28pm On Oct 06, 2020
If you stay in Lagos and you're looking for a space where you can have access to internet and power for your programming work.A cool workspace with standard internet and 24/7 power supply is available around pedro lagos state at friendly price. If you are interested, you can call any of these numbers-07035918225,08023911735 or visit https://www.kreateng.com/workstation to know more.
Re: A Thread For Tutorial On Python Programming by marsman: 11:39am On Oct 09, 2020
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 4:38pm On Oct 09, 2020
marsman:
Any body here that can put me through the While operatiin in Python i find it hard to comprehend

You mean while loop / use cases?
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 4:41pm On Oct 09, 2020
SirJerrie:
Finally...A python community on Nairaland!!!
Hello to the Ogas in the house and fellow python enthusiasts ...
So I started my python journey last 4 months with Automate The Boring Stuff With Python
then I moved to Zero to Hero with python by Jose portila...
I FEEL LIKE I'M NOT PROGRESSING
After 4 months of being on python I haven't atill gotten to the level I thought I'd be at...
I see people who say they learnt it under a month...at most 2 months. And rhey were able to write cool programs with it.
But I seem to get it write..like I'm stuck.



I'd like to know if theres something I'm not doing right?..
For those of you that are proficient with python, what was your journey like??
How long did it take you to get to where you currently are with python??
First to be honest with you, different stroke for different folks.

Some people are actually good at grasping codes and tutorials very quickly while others do take a while.

My advice for you is never to copy any body's speed in learning how to code. Lemme give you some use cases, I learnt and write sophisticated bash codes with 1 - 2weeks of trying it all out. But consistently, I still find myself going back to refresh on basics.

1 Like

Re: A Thread For Tutorial On Python Programming by marsman: 4:41pm On Oct 09, 2020
1stSonOfLucifer:


You mean while loop / use cases?
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 4:56pm On Oct 09, 2020
marsman:
Yes, while loop. a summary will be fine.

A loop is synonymous to iteration. Meaning the code should keep running for as long as the condition that initiated the block is TRUE.

I'm going to give you one/two use case(s) using python.

Say you want to find an item among list of items. Definitely within yourself, you know some conditions must met, if that condition is not met, you want the code to keep running. So to keep the code running, you implement a loop, which could be a while or for loop

Another use case is when you wanna check that a user input is never empty. And if it's empty, the input() should be called until its never None

1 Like

Re: A Thread For Tutorial On Python Programming by marsman: 5:46pm On Oct 09, 2020
1stSonOfLucifer:


A loop is synonymous to iteration. Meaning the code should keep running for as long as the condition that initiated the block is TRUE.

I'm going to give you one/two use case(s) using python.

Say you want to find an item among list of items. Definitely within yourself, you know some conditions must met, if that condition is not met, you want the code to keep running. So to keep the code running, you implement a loop, which could be a while or for loop

Another use case is when you wanna check that a user input is never empty. And if it's empty, the input() should be called until its never None
Can i get a an example,like an example that involves programing.I mean how i can use it . thanks.
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 6:11pm On Oct 09, 2020
marsman:

Can i get a an example,like an example that involves programing.I mean how i can use it . thanks.

Okay good question,
Lets take the second case above,
Say you wanna check that an input() by a user is yes/y

import re

pattern = re.compile(r'^(y|yes)$', re.IGNORECASE)

# keep asking user to enter y/yes
# if doesnt match y/yes
# keep asking user repeatedly
while True:
user_input = input("Please enter y/yes to proceed: "wink
# if matches condition
# break the loop or exit loop
if pattern.match(user_input):
break
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 6:29pm On Oct 09, 2020
@marsman

Incase you can contact me at masterscliq (at) Gmail dot com for better explanation
Re: A Thread For Tutorial On Python Programming by marsman: 6:37pm On Oct 09, 2020
1stSonOfLucifer:
@marsman

Incase you can contact me at masterscliq (at) Gmail dot com for better explanation
Thank you, I will surely contact you if need be
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 6:52pm On Oct 09, 2020
marsman:

Thank you, I will surely contact you if need be
Okay. Loops in any form is very simple to understand tho.

While loop is barely used in everyday code of python. In BASH scripting, it's very common to use it sha

1 Like

Re: A Thread For Tutorial On Python Programming by IFIRI(f): 7:38pm On Oct 09, 2020
please add me on Whatsapp group 07054953000
Re: A Thread For Tutorial On Python Programming by Oluwapresley(m): 11:04pm On Oct 09, 2020
Ever since I installed Pycharm, I have not been able to run any code on it. Python IDE works well; I have run codes on that. But pycharm, nothing. Something is always wrong. Sometimes it will say something like main module blah blah. I just tire. Anyone that can help put me through please.
Re: A Thread For Tutorial On Python Programming by JohnBullMySon: 3:21pm On Oct 10, 2020
Oluwapresley:
Ever since I installed Pycharm, I have not been able to run any code on it. Python IDE works well; I have run codes on that. But pycharm, nothing. Something is always wrong. Sometimes it will say something like main module blah blah. I just tire. Anyone that can help put me through please.
Try pyscripter.
Re: A Thread For Tutorial On Python Programming by Oluwapresley(m): 7:47pm On Oct 10, 2020
JohnBullMySon:
Try pyscripter.

Good Evening, boss. Thanks for getting back to me. Please, how do I go about it? The pyscripter is an IDE?
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 8:32pm On Oct 10, 2020
Oluwapresley:
Ever since I installed Pycharm, I have not been able to run any code on it. Python IDE works well; I have run codes on that. But pycharm, nothing. Something is always wrong. Sometimes it will say something like main module blah blah. I just tire. Anyone that can help put me through please.
Can you share a screenshot? How do you run your python codes via the IDE? Do u use the PLAY button?

Share a screen grab of the error
Re: A Thread For Tutorial On Python Programming by JohnBullMySon: 9:51pm On Oct 10, 2020
Oluwapresley:


Good Evening, boss. Thanks for getting back to me. Please, how do I go about it? The pyscripter is an IDE?
yeah. Download it from sourceforge
Re: A Thread For Tutorial On Python Programming by loiusdthird(m): 9:42am On Oct 13, 2020
Missionaire:
Good morning all.
I have three questions.

1. Why can't we have a sub section for programming languages communities the like of Stack Overflow here on nairaland?
2. I just started learning programming with Python (with no prior knowledge of programming o) and I have been trying to swap variables.
I have done the following:

i . a = 7
b = 9
a, b = b, a
print ("a =", a)
print ("b =", b)

But what I get is:
NameError: name 'a' is not defined.

ii . v1 = "This is a boy"
v2 = "Is this a girl? "

temp = v1
v1 = v2
v2 = temp

print (v1)
print (v2)
...................
I still get error messages. What could I be doing wrong? I use jupyter notebook.

3. Is there any (newbie) python programmer resident in (Asokoro) Abuja, so we can connect and learn together?
I stay in abuja but I have no prior knowledge of python. am just starting my programming journey
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 11:37am On Oct 13, 2020
Missionaire:
Good morning all.
I have three questions.

1. Why can't we have a sub section for programming languages communities the like of Stack Overflow here on nairaland?
2. I just started learning programming with Python (with no prior knowledge of programming o) and I have been trying to swap variables.
I have done the following:

i . a = 7
b = 9
a, b = b, a
print ("a =", a)
print ("b =", b)

But what I get is:
NameError: name 'a' is not defined.

ii . v1 = "This is a boy"
v2 = "Is this a girl? "

temp = v1
v1 = v2
v2 = temp

print (v1)
print (v2)
...................
I still get error messages. What could I be doing wrong? I use jupyter notebook.

3. Is there any (newbie) python programmer resident in (Asokoro) Abuja, so we can connect and learn together?
Your code is correct. However you should know python is space and tab indent strict...

Try remove the space in your print() method
Nairaland is a multi niche platform.
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 11:38am On Oct 13, 2020
loiusdthird:
I stay in abuja but I have no prior knowledge of python. am just starting my programming journey
Welcome. Python is very easy to understand tho
Re: A Thread For Tutorial On Python Programming by Missionaire: 3:25pm On Oct 13, 2020
loiusdthird:
I stay in abuja but I have no prior knowledge of python. am just starting my programming journey

Where in Abuja?
Re: A Thread For Tutorial On Python Programming by loiusdthird(m): 5:55pm On Oct 13, 2020
Missionaire:

Where in Abuja?
karmo
Re: A Thread For Tutorial On Python Programming by loiusdthird(m): 5:57pm On Oct 13, 2020
1stSonOfLucifer:
Welcome. Python is very easy to understand tho
python here I come
Re: A Thread For Tutorial On Python Programming by Missionaire: 7:56pm On Oct 13, 2020
loiusdthird:
karmo

Me, AYA/Asokoro
Re: A Thread For Tutorial On Python Programming by loiusdthird(m): 7:49am On Oct 14, 2020
Missionaire:


Me, AYA/Asokoro
can I send u a dm
Re: A Thread For Tutorial On Python Programming by seunny4lif(m): 2:47pm On Oct 16, 2020
Please how do you divide in Python to get an even number or odd number without using modulus
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 5:06pm On Oct 16, 2020
seunny4lif:
Please how do you divide in Python to get an even number or odd number without using modulus
First you're violating the zen of python that states:
- SIMPLE IS BETTER THAN COMPLEX,
- EXPLICIT IS BETTER THAN IMPLICIT.


Anyways that aside, back to your question
I doubt it's possible to achieve ya task.

Maybe you don't understand, lemme break it down. What you're saying is more synonymous to getting SUM of two number without using "+"
Re: A Thread For Tutorial On Python Programming by seunny4lif(m): 5:25pm On Oct 16, 2020
I know but that's my school assessment
Our prof told us we should know it cos its the first question in our exam
1stSonOfLucifer:

First you're violating the zen of python that states:
- SIMPLE IS BETTER THAN COMPLEX,
- EXPLICIT IS BETTER THAN IMPLICIT.


Anyways that aside, back to your question
I doubt it's possible to achieve ya task.

Maybe you don't understand, lemme break it down. What you're saying is more synonymous to getting SUM of two number without using "+"
Re: A Thread For Tutorial On Python Programming by 1stSonOfLucifer(m): 6:29pm On Oct 16, 2020
seunny4lif:
I know but that's my school assessment
Our prof told us we should know it cos its the first question in our exam

Then it's mathematics related or more of data structure and algorithm.

Anyways got a hack for you online.


def getRemainder(num, divisor):
return (num - divisor * (num // divisor))

(1) (2) (3) ... (21) (22) (23) (24) (25) (26) (27) ... (32) (Reply)

Chronicle Of A Data Scientist/analyst / I Want To Learn Programming. Which Language Should I Start With?

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