Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,738 members, 7,817,030 topics. Date: Friday, 03 May 2024 at 11:58 PM

Monikulapo's Posts

Nairaland Forum / Monikulapo's Profile / Monikulapo's Posts

(1) (2) (3) (4) (of 4 pages)

Programming / Re: Help needed for Backend Developer / Product Manager Roadmap by monikulapo: 9:25pm On Oct 24, 2021
Hello peeps. Help. plez. Thanks.
Programming / Re: Python Programmers Share Your Learning Process by monikulapo: 9:17pm On Oct 24, 2021
Perhaps study it in a gamified setting, study with intentions to start a personal project or get a study partner ?
What’s delaying your progress ?
Programming / Re: Help needed for Backend Developer / Product Manager Roadmap by monikulapo: 4:28pm On Oct 22, 2021
Sorry if this sounds naive, but how do I implement this into my current workflow ??

My current workflow is learning Python and programming skills in general by solving Algo & DS styled questions. While doing this, I am focusing on refactoring my code, learning runtimes and common algorithms. I plan on doing this until I am comfortable with classes and OOP.

1 Like

Programming / Help needed for Backend Developer / Product Manager Roadmap by monikulapo: 4:16pm On Oct 22, 2021
Senior Backend Developers / Software Engineers in the house, what do I need to focus on as a beginner and what are some suggested roadmaps to follow if I eventually want to transition into a technical product manager role.
Programming / Re: My Python Programming Diary by monikulapo: 4:06pm On Oct 22, 2021
The maximum sum subarray problem consists in finding the maximum sum of a contiguous subsequence in an array or list of integers:
max_sequence([-2, 1, -3, 4, -1, 2, 1, -5, 4]) should return 6 '[4, -1, 2, 1]'. https://www.codewars.com/kata/54521e9ec8e60bc4de000d6c/train/python

My initial Solution:
def max_sequence(arr):
totalmax = 0
currentmax = 0

for i in arr:
currentmax += i

if totalmax < currentmax:
totalmax = currentmax
if currentmax < 0:
currentmax = 0

return totalmax


Areas for improvement:
Modify script to also return the corresponding array
Programming / Re: I Need Clarification On ICT Carriers. by monikulapo: 12:54am On Oct 18, 2021
tensazangetsu20:

I didn't have any background. I was a mechanic before I became a programmer and my first salary was 100k. I studied my ass like crazy. Programming morning till night everyday till I was ready for my first job.

Not trying to down play your progress but I still think it’s a bit of an oversimplification especially in Nigerian context to say you were a mechanic first. You had a solid University engineering education, you were a computer literate and you were also an entrepreneur. That’s different from a 30 year old conditioned private school teacher who’s not too comfortable with basic MS Word.
Programming / Re: My Python Programming Diary by monikulapo: 10:09pm On Oct 15, 2021
Given an array of integers. Return an array, where the first element is the count of positives numbers and the second element is sum of negative numbers.
If the input array is empty or null, return an empty array. For input [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -11, -12, -13, -14, -15], you should return [10, -65].

My initial Solution:
def count_positives_sum_negatives(arr):
if len(arr) == 0:
return arr

sum = 0
count = 0
for i in arr:
if i > 0:
count += 1
if i < 0:
sum += i

return [count, sum]
Played around with sets, and return statement/expression:
def count_positives_sum_negatives(arr):
total = sum(i for i in arr if i < 0)
count = sum(1 for i in arr if i > 0)
return [count, total] if len(arr) else []

Areas for improvement:
Find the fastest solution
Programming / Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by monikulapo: 7:56pm On Oct 14, 2021
Hello all,
How long would you advise to spend on learning Python basics before diving into Django ?
Programming / Re: My Python Programming Diary by monikulapo: 7:16pm On Oct 14, 2021
https://www.codewars.com/kata/576757b1df89ecf5bd00073b
Build Tower by the following given argument: number of floors (integer and always greater than 0). Tower block is represented as *,
Return a list. For example, a tower of 3 floors looks like the result below
[
' * ',
' *** ',
'*****'
]
and a tower of 6 floors looks like the result below
[
' * ',
' *** ',
' ***** ',
' ******* ',
' ********* ',
'***********'
]
My initial solution:
def tower_builder(n_floors):
tower = []
space = (n_floors * 2) - 1
for i in range(n_floors):
sign = '*' * ((i * 2) + 1)
floor = sign.center(space)
tower.append(floor)
return tower
Played around with list comprehension:
def tower_builder(n_floors):
space = (n_floors * 2) - 1
return [('x' * ((i * 2) + 1)).center(space) for i in range(n_floors)]

Areas for improvement:
Test both scripts to see if list comprehension is faster
Programming / Re: My Python Programming Diary by monikulapo: 2:40am On Oct 14, 2021
Gentleman001:

Use for I in range of a.. that should solve the issue
You cannot find the range of a list.
The problem has been solved, and I also provided an explanation for the error.
Next time, to prevent derailing this thread please ensure you test your solutions before suggesting them.

1 Like

Programming / Re: My Python Programming Diary by monikulapo: 2:21am On Oct 14, 2021
Implement a function that accepts 3 integer values a, b, c. The function should return true if a triangle can be built with the sides of given length and false in any other case.
(In this case, all triangles must have surface greater than 0 to be accepted)https://www.codewars.com/kata/56606694ec01347ce800001b/python
Here's my solution:
def is_triangle(a, b, c):
if (a + b > c) and (a + c > b) and (b + c > a):
return True
else:
return False

1 Like

Health / Re: Suffering From Attention Deficit. by monikulapo: 2:24pm On Oct 12, 2021
shiggy:


Pls where did you get for this price? Got from a drug store for 14k
Alpha Phamarcy
Programming / Re: My Python Programming Diary by monikulapo: 1:53pm On Oct 12, 2021
In a small town the population is p0 = 1000 at the beginning of a year. The population regularly increases by 2 percent per year and moreover 50 new inhabitants per year come to live in the town. How many years does the town need to see its population greater or equal to p = 1200 inhabitants? https://www.codewars.com/kata/563b662a59afc2b5120000c6/train/python

Here's my solution:
def nb_year(p0, percent, aug, p):
totalp = 0
year = 0
percent = percent / 100
while totalp < p:
totalp = p0 + (p0 * percent) + aug
totalp = int(totalp)
p0 = totalp
year += 1
return year

1 Like

Programming / Re: My Python Programming Diary by monikulapo: 12:48pm On Oct 12, 2021
For anyone following, this was what I was solving when I encountered the problem above:
Given: an array containing hashes of names.
Return: a string formatted as a list of names separated by commas except for the last two names, which should be separated by an ampersand. https://www.codewars.com/kata/53368a47e38700bd8300030d/train/python
For example:
namelist([ {'name': 'Bart'}, {'name': 'Lisa'}, {'name': 'Maggie'} ])
# returns 'Bart, Lisa & Maggie'

namelist([ {'name': 'Bart'}, {'name': 'Lisa'} ])
# returns 'Bart & Lisa'

namelist([ {'name': 'Bart'} ])
# returns 'Bart'

namelist([])
# returns ''

This is my solution,
def namelist(names):
lnames = [name['name'] for name in names] #Unpack name values from dictionary into a list
flist = lnames[:-2] #flist of names exluding last two elements
elist = lnames[-2:] #elist containing last two elements
eString = ' & '.join(elist) #string of last two elements joined with '&'

if len(lnames) <= 1:
return ''.join(lnames) #returns single element as string
else:
nflist = [name + ',' for name in flist] #create nflist containing comma modified elements from flist
nflist.append(eString) #added last string as an element to nflist
return ' '.join(nflist) #returns list elements as strings

1 Like

Programming / Re: My Python Programming Diary by monikulapo: 2:29pm On Oct 09, 2021
Hello house, I expect the code snippet above to return:
Wayne, John, Samson, Mike, Seun,
However, what I get is:
Wayne, John, Samson,
Please, what is going on under the hood ?
a = ['Seun','Mike','Samson','John','Wayne']
j = ''
for i in a:
j = j + a.pop()
j += ', '
print(j)
I was wondering why the a.pop() method isn't working as expected.

Modified:
Okay, so I just learnt that modifying a list while iterating through it could lead to errors like this. It is best to create a new list and add items to it rather than removing items from the existing list.

3 Likes 1 Share

Programming / My Python Programming Diary by monikulapo: 1:53pm On Oct 09, 2021
Hello All,

I am currently working through Codewars in order to improve my Python Proficiency before diving into Django.
I provide the problem links, along with my solution for anyone who's interested.
Any suggestions on alternate solutions, logic and best practices would be really appreciated.
Health / Re: I'm Not Passing Urine: Somebody Should Help Me. by monikulapo: 12:01am On Oct 08, 2021
dierich:


Thanks so much sir
I'll do as u said.
I just hope I'll be fine and won't have a kidney problem coz I'm scared and that alone is making me sick.
Thanks once again sir


Keep track of your symptoms, your diagnosis is only as good as what you say (symptom), the result of the test and quality of the doctor you see. You can control two variables, so work on those.

Also don't put diagnosis in the doctors mouth, don't mention 'Kidney' at all ... state your symptoms as broadly and detailed as you can. Let the doctor make a diagnosis based on that and the test result then get an extra eye to also independently interpret the results. You should keep results of all your previous tests, so you can compare results.

13 Likes 2 Shares

Health / Re: I'm Not Passing Urine: Somebody Should Help Me. by monikulapo: 11:42pm On Oct 07, 2021
Go to the best hospital you can afford. Get a Kidney Test, Liver Test and Prostate-Specific Antigen (PSA) Test.
You should get a full blood test if you can afford it.
Essentially you are trying to confirm if it's a prostate or kidney problem. Based on your post history of trouble peeing and getting erection I think it might be enlarged prostate.

To help your Doctor diagnose you better, keep a detailed note of your observations and symptoms. The quality of the doctors diagnosis is related to how best you can explain your symptoms.

34 Likes 2 Shares

Health / Re: Body Is Swelling Up Without Cure by monikulapo: 11:12pm On Oct 07, 2021
Curious345:
what does this detect?

Kidney Function, essentially how well the Kidneys are working
Health / Re: Suffering From Attention Deficit. by monikulapo: 11:09pm On Oct 07, 2021
Guest911:
Try not to overdose, read up on the side effects.

It’ll definitely make you hyper-focus over an insanely long period. I also take it with fearless energy drink

My personal experience
1 tablet per day is enough, anything more triggers anxiety.
There’s a slight increase in blood flow/heart beat. ( more reason not to overdose)

Rubifen is slightly better because it starts working a lot quicker compared to Ritalin.

Both drugs gave me insomnia, sometimes I sleep around 4:00am. so take it in the morning around 6-7am so the effects can reduce before bedtime.


Hello, besides insomnia what's the crash and come down on Ritalin like ?
Health / Re: Suffering From Attention Deficit. by monikulapo: 11:06pm On Oct 07, 2021
It would keep you up and make your workload more manageable with occasional tunnel vision focus, but not comparable to Ritalin or other stronger stimulants. Haven't experienced any significant side effect other than forgetting you need sleep though cheesy
Health / Re: Suffering From Attention Deficit. by monikulapo: 8:15pm On Oct 07, 2021
Dollywood:


Besides, how much did you bought your modafinil?

30 Tabs of 100mg should be ~ N5000.
Health / Re: Suffering From Attention Deficit. by monikulapo: 8:14pm On Oct 07, 2021
tatatar:

Chai 10,500 for 15 tabs.
I bought a drug called modafinil which can also be used for adhd,but after the first day I couldn't feel the effect anymore.
Please can I see a snapshot of your prescription.

what brand of Modafinil is it ? I bought the 100mg Milpharm and have the same experience.
Business / Re: ➜ ➜ ➜Currency/E-currency Market Deals 2020 ➜ ➜ ➜ by monikulapo: 9:16pm On Oct 03, 2021
$25 paypal urgently needed.

(1) (2) (3) (4) (of 4 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. 35
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.