Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,521 members, 7,819,871 topics. Date: Tuesday, 07 May 2024 at 04:26 AM

ICode2's Posts

Nairaland Forum / ICode2's Profile / ICode2's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (of 13 pages)

Programming / Re: Funny Programming Memes. Just For Laughs by iCode2: 7:59pm On May 25, 2020

1 Like

Programming / Re: I Want To Learn Programming. Which Language Should I Start With? by iCode2: 2:35pm On May 24, 2020
Graspad:
I started with Django, trying to make a blog app.
But I'm getting this error.
Help will be greatly appreciated.
Hi, can I talk to you offline? Maybe on WhatsApp..
Programming / Re: Common good python programming practices you should know by iCode2: 7:14pm On May 22, 2020
Hi gbolly1151, you seem to be very good with Python. When did you start learning? And are you self-taught?

1 Like

Programming / Re: Let Learn Artificial Neutral Network by iCode2: 7:47pm On May 20, 2020
gbolly1151:

Hmm...it is possible to see that equation in physics but it is math [linear equation]
Hmmm nice one

1 Like

Programming / Re: I Want To Learn Programming. Which Language Should I Start With? by iCode2: 7:46pm On May 20, 2020
HappyPagan:
@iCode2

Try this.
def collatz(number):
# test if the number is even
# If number is odd, then collatz() should print and return 3 * number + 1
if number % 2 == 0:
print(f'{number} // 2 : {number//2}')
return (number // 2)
else:
print(f'3 * {number} + 1 : {3 * number + 1}')
return (3 * number + 1)


userInput = int(input('Enter an integer: ')) #this line gets userInput


while userInput != 1:
userInput = collatz(userInput)
It worked! Thanks
Programming / Re: Let Learn Artificial Neutral Network by iCode2: 7:37pm On May 20, 2020
This looks like Physics. cheesy

1 Like

Programming / Re: Chronicle Of A Data Scientist/analyst by iCode2: 7:34pm On May 20, 2020
whizqueen:
I’m new here. Learning my first language SQL and it’s been fun so far. I see lots of information in this thread, I can’t wait to explore them smiley

Is anyone here self trained and a beginner?

I would be working on python, R and machine language later on.

Any tips or resources for a beginner would be appreciated
See this girl! grin
Hi from on old friend from 2015 Nairaland.

Wish you the best in your study.
Programming / Re: Common good python programming practices you should know by iCode2: 10:48pm On May 18, 2020
gbolly1151:

Download think python
Alright, thanks.
Programming / Re: Common good python programming practices you should know by iCode2: 8:17pm On May 18, 2020
Can anyone recommend good python books with a lot of exercises? I just started out with automate the boring stuff.

1 Like

Programming / Re: Common good python programming practices you should know by iCode2: 8:16pm On May 18, 2020
Predstan:


Oh Sorry, I hope I haven't confused you
Nope..
Programming / Re: Programmers Chat Room. by iCode2: 8:13pm On May 18, 2020
Grandlord:
No dey whine me smiley

Where did you get the exercises from, please?
Lol.

Automate the boring stuff.

2 Likes 1 Share

Programming / Re: Common good python programming practices you should know by iCode2: 7:45pm On May 18, 2020
gbolly1151:


That code for recursion doesn't look like one and even the first method will still end up looping and wont end.
Am thinking should look like this


def collatz(number):
if number % 2 == 0:
return number // 2
elif number % 2 == 1:
return 3 * number + 1

number =int(input("Enter Number" ))
Num = number
while Num != 1:
Num=collatz(Num)
print(Num)
I got the correct output from this. Thanks

1 Like

Programming / Re: Common good python programming practices you should know by iCode2: 7:44pm On May 18, 2020
Predstan:


First you need to return the number from the Collatz function as an integer not a print function... use: return number//2.

Then you have to check that the return value from the Collatz is not equal to 1 if not, user keeps inputting number and the Collatz function is called on the number from user.


def collatz(number):
if number % 2 == 0:
return number // 2
elif number % 2 == 1:
return 3 * number + 1

number =int(input("Enter Number" ))
Num = collatz(number)
while Num != 1:
continue




Using Recursion:

def collatz(number):
if number % 2 == 0:
return number // 2
elif number % 2 == 1:
return 3 * number + 1
def main():

number =int(input("Enter Number" ))
Num = collatz(number)
while Num != 1:
main()
return print ("Callatz on", number, "is", Num)

main()

Thanks but it didn't give the right output.
Programming / Re: Programmers Chat Room. by iCode2: 4:36pm On May 18, 2020
Grandlord:
Good. You're doing well smiley
Thank you sir. grin
Programming / Re: Programmers Chat Room. by iCode2: 2:47pm On May 18, 2020
codeigniter:




def collatz():
if number % 2 == 0:
return number // 2

elif number % 2 == 1:
return 3 * number + 1



number = int(input())

while number != 1:
number = collatz()
print(number)

Passing number as argument will make it call the same number

I hope this helps
I see where I missed it. Thanks a lot, it worked!
Programming / Re: Common good python programming practices you should know by iCode2: 11:55am On May 18, 2020
Hey guys, so, I'm trying my hands on this exercise:

The Collatz Sequence Write a function named collatz() that has one parameter named number. If number is even, then collatz() should print number // 2 and return this value. If number is odd, then collatz() should print and return 3 * number + 1. Then write a program that lets the user type in an integer and that keeps calling collatz() on that number until the function returns the value 1. (Amazingly enough, this sequence actually works for any integer—sooner or later, using this sequence, you’ll arrive at 1! Even mathematicians aren’t sure why. Your program is exploring what’s called the Collatz sequence, sometimes called “the simplest impossible math problem.”) Remember to convert the return value from input() to an integer with the int() function; otherwise, it will be a string value. Hint: An integer number is even if number % 2 == 0, and it’s odd if number % 2 == 1.

Here's my code:


def collatz(number):
if number % 2 == 0:
return print(number // 2)
elif number % 2 == 1:
return print(3 * number + 1)

number =int(input())
while number != 1:
collatz(number)


What am I not doing right?
Programming / Re: I Want To Learn Programming. Which Language Should I Start With? by iCode2: 11:52am On May 18, 2020
Hey guys, so, I'm trying my hands on this exercise:

The Collatz Sequence Write a function named collatz() that has one parameter named number. If number is even, then collatz() should print number // 2 and return this value. If number is odd, then collatz() should print and return 3 * number + 1. Then write a program that lets the user type in an integer and that keeps calling collatz() on that number until the function returns the value 1. (Amazingly enough, this sequence actually works for any integer—sooner or later, using this sequence, you’ll arrive at 1! Even mathematicians aren’t sure why. Your program is exploring what’s called the Collatz sequence, sometimes called “the simplest impossible math problem.”) Remember to convert the return value from input() to an integer with the int() function; otherwise, it will be a string value. Hint: An integer number is even if number % 2 == 0, and it’s odd if number % 2 == 1.

Here's my code:


def collatz(number):
if number % 2 == 0:
return print(number // 2)
elif number % 2 == 1:
return print(3 * number + 1)

number =int(input())
while number != 1:
collatz(number)


What am I not doing right?
Cc: Daejoyoung
And all
Programming / Re: Programmers Chat Room. by iCode2: 11:48am On May 18, 2020
Hey guys, so, I'm trying my hands on this exercise:

The Collatz Sequence Write a function named collatz() that has one parameter named number. If number is even, then collatz() should print number // 2 and return this value. If number is odd, then collatz() should print and return 3 * number + 1. Then write a program that lets the user type in an integer and that keeps calling collatz() on that number until the function returns the value 1. (Amazingly enough, this sequence actually works for any integer—sooner or later, using this sequence, you’ll arrive at 1! Even mathematicians aren’t sure why. Your program is exploring what’s called the Collatz sequence, sometimes called “the simplest impossible math problem.”) Remember to convert the return value from input() to an integer with the int() function; otherwise, it will be a string value. Hint: An integer number is even if number % 2 == 0, and it’s odd if number % 2 == 1.

Here's my code:


def collatz(number):
if number % 2 == 0:
return print(number // 2)
elif number % 2 == 1:
return print(3 * number + 1)

number =int(input())
while number != 1:
collatz(number)


What am I not doing right?
Cc: Grandlord
Bunnae
Crownedrookie
Lordpeckxy
Codeigniter
And all

1 Like

Programming / Re: I Want To Learn Programming. Which Language Should I Start With? by iCode2: 8:40pm On May 15, 2020
Daejoyoung:

yes there is a need to learn html, css, and probably javascript.
I thought html and css is front end?
Programming / Re: Programmers Chat Room. by iCode2: 8:40am On May 14, 2020
Thanks much @ LSarcastic, Lordpeckxy

1 Like

Programming / Re: Best Laptops For Programmers by iCode2: 11:50pm On May 12, 2020
silento:


Yes you need at lest 15.6 screen for full time programming in 2020

Serious programmers are opting for the option of spilt screen sef

14, 14.1 can do programming but no serious one screen size will frustrate u am talking from experience one day try to code on 32 inches external screen u will enjoy programming that day and also thank me later
I'm just starting out sha. And I think wider screen equals more money.. Right?
Programming / Re: Programmers Chat Room. by iCode2: 10:43pm On May 12, 2020
Okay thanks. I'll look into that.
Taofeekdboy:
bro, the reason my most people prefer hdd drive is because of the price.. Ssd is very expensive but the speed is second to none, I was using hdd before, crashes everytime and very slow but since when I have changed to ssd, I regret ever buying an hdd laptop.
crownedrookie:

Do not buy a 4g RAM laptop
Is a 14" okay for programming? Someone advised against it.
Programming / Re: Best Laptops For Programmers by iCode2: 10:41pm On May 12, 2020
silento:
For web development and regular coding and script , plugin coding

What you need in 2020

Wide screen :
Infact when I see programmers saying ram , graphics etc I keep laughing in 2020 you need at lest 15.6 screen size that's the smalleat for programming
When you do web programming u will understand why u need wider screen


Keyboard :
You need keyboard which is upto 102 to 106 keys and such keyboard is what we called standard keyboard they are those keyboard that has number keys popularly known as num pads
Standard laptop keyboard sucks at programming , also international layout keyboard sucks go for us layout keyboard


Battery or power backup :
You need stable battery or power supply coz on pc 10 hours equals to 1hour when u dey code


Ram : 4GB minimum
Graphics :
This is where people gets confuse

If are going for amd :
Total system video memory should be : 2024mb and up
Dedicated : 128mb minimum

For Intel : 1600mb and up
Dedicated : 64mb minimum

For nvidia : 1800mb
Dedicated : 128mb minimum


Processor :
Make sure you are buying system that is amd64 which is the standard x64

Make sure your processor supports hyper threading And turbo boost

Anyway I can't just remember clearly which of the name the two processor use for the boost technology

Make sure your processor clock is up to 2.0Ghz both intel and amd

Dual core with two virtual processor or better
Something like i3,i5,i7

Amd x4,A6 , k8 etc are all good even legendary x2 amd will serve well for web programming

Operating system :
1. Linux - ubuntu
2.Windows
3.Mac os
I know Mac people will come for me but before you come for me , I have code on all this three operating system Mac native os sucks at programming , window is supposed to be first but Linux is distraction free than Windows

For easy set up window os , linux then Mac os

For storage :
Forget all this hype about big data 120gb is ok

If you have the money go for ssd , hdd dey cast most time



Then a working brain na must
You mean a 14" hp Elitebook Folio isn't good enough for programming?
Programming / Re: Programmers Chat Room. by iCode2: 10:25pm On May 12, 2020
Taofeekdboy:

I think option 2 is much more better but if you can close your eyes and buy a laptop of ssd drive, even if the size is 128gb, you won't regret you did because of their speed. It will help you in the future as you are adding software to your system.
Really? I actually saw ssd but requested for hdd because I don't know much about it. Doesn't it have issues with crashing?
Programming / Re: Programmers Chat Room. by iCode2: 9:26pm On May 12, 2020
Grandlord:
Depends on your budget. But as you said, option 2 is better. You might need it for something 'heavier' in the future. Buy once and never worry about it again.
Budget isn't the issue. Just thinking twice about coughing out 100k for laptop grin grin Well, like you said, buy once and never worry about it again.

1 Like 1 Share

Jobs/Vacancies / Re: Having Difficult Times Securing A Job, Or Need A Side Hustle? Check This Out! by iCode2: 9:14pm On May 12, 2020
bunnae:
Oh man! Nl Online banters used to be cool from around 2010 to 2016. But common, even people like sinzuuu, tsomm, kvnginvalhalllla etc have all grown up and left this way of life. It's definitely not cool, we just didn't see it at the time.
You knew these guys? grin grin How come I don't remember you in my former moniker? cheesy
Programming / Re: Programmers Chat Room. by iCode2: 9:12pm On May 12, 2020
Hello guys
Quick one: Which is the better option to go for (a noob)

Option 1 - 4gb RAM, 500GB hdd, core i5 --> #80k - #90k
Option 2 - 8GB RAM, 500GB hdd, core i7 --> #100k - #110k

I know option 2 is of a higher quality but do I really need all that as a noob?

Cc: Grandlord
Bunnae
Crownedrookie
MountainView
Lordpeckxy
Ejiod
Codeigniter
And all
Programming / Re: Programmers Chat Room. by iCode2: 9:53am On May 08, 2020
Grandlord:
Phone? Wow! Utmost dedication and drive. That's a successful person right there! Tap into the spirit bro because I don tap o grin
grin grin grin
Programming / Re: Programmers Chat Room. by iCode2: 8:56am On May 08, 2020
Grandlord:
I'm good bro. Been a while. How are you doing?

No, man. Not really good. Let me put it into perspective. 600 hours in 6 months. Do the maths grin
Lol it's still very much commendable. I actually lost the drive cos my laptop was faulty until yesterday I stumbled on someone doing a lot with her phone!!!
Programming / Re: Programmers Chat Room. by iCode2: 5:44am On May 08, 2020
Grandlord

What's up? I see you're doing well. 600 hours no be beans cheesy
Programming / Programmers Chat Room. by iCode2: 5:43am On May 08, 2020
Hey guys, I feel the need to have a thread like this in this section. It'll help curb derailing on other threads, serve as a platform to ask random questions instead of creating a new thread for every single question you want to ask. We can even network and share ideas here.
Jobs/Vacancies / Re: Having Difficult Times Securing A Job, Or Need A Side Hustle? Check This Out! by iCode2: 5:06pm On Apr 09, 2020
Grandlord:
No be so, baby girl. If you have any questions or ideas you're free to hit me up nor fear. I still dey push the level dey go small small. If you see ie2 tell am say I dey greet o cheesy
Lol. How's the isolation affecting you guys?

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (of 13 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. 56
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.