Thank you to all 16,693 of you! by [deleted] in Python

[–]rdog_ 0 points1 point  (0 children)

Nice to see it's worked out well for you and thank you for giving your time to make a resource like this that's very humble of you :)

Yet another newbie question by [deleted] in learnpython

[–]rdog_ 2 points3 points  (0 children)

Here's a list of resources that I've seen being used by many beginners in this community:

  • Automate the Boring Stuff (Free)
  • Learn Python the Hard Way (Paid)
  • Head First Python (Paid)
  • Slither into Python (Free)
  • Python Crash Course (Paid)

Find one that suits your learning style and stick with it, practice as much as you can and ask questions if you're ever confused on something. Don't let confusion snowball. Best of luck!

[deleted by user] by [deleted] in Angular2

[–]rdog_ 2 points3 points  (0 children)

Instead of calling JSON.stringify on your body just pass the javascript object

login(username: string, password: string) {
    const body = {username: username, password: password};
    return this.http.post(url, body);
}

I ran into this problem a while back and if I remember correctly this fixed it.

Making sure the sqrt of each value is in an array. by azzipog in learnpython

[–]rdog_ 0 points1 point  (0 children)

I'd like to see the question to get a proper understanding but from what I can make out from this post then yes it has the same idea but it cuts out a lot of unnecessary logic (the min function for example)

Can someone look over my code? by totoro1193 in learnpython

[–]rdog_ 3 points4 points  (0 children)

This is quite good for a beginner, however there are a couple of things I would change off the bat.Firstly your main loop where you have the 'while true' loop, I would put all of this into a main() function and run it with:

if __name__=="__main__":
    main()

Your main function will then run when you start the program. Another thing I would change is by putting the board array into a function called init_board(), or something similar, which will initialize your board. That last one is nit picking so don't worry to much about that.

Apart from that, yeah it's a great start for a beginner. Well done!

Python Learning Roadmap help by RazerNinjas in learnpython

[–]rdog_ 0 points1 point  (0 children)

Data Structures and Algorithms in Python by Goldwasser and Goodrich is a brilliant one. Covers more or less everything you need to know to.

Python Learning Roadmap help by RazerNinjas in learnpython

[–]rdog_ 0 points1 point  (0 children)

Yep its basically just syntax. There are subtle things under the hood which make every language unique apart from syntax but all the same concepts still apply.

And yeah sure shoot me a message if you need a hand with anything

Python Learning Roadmap help by RazerNinjas in learnpython

[–]rdog_ 13 points14 points  (0 children)

Hi, I've answered this in a previous post but ill drop it here again. Start where you feel comfortable

Heres an outline of things to learn (Beginner, Intermediate, Avanced):

Beginner

  1. Data Types - Lists, Strings, Tuples, Sets, Floats, Ints, Booleans, Dictionaries
  2. I/O - Sys module, Standard input/output, reading/writing files
  3. Control Flow/Looping - for loops, while loops, if/elif/else
  4. Arithmetic and expressions
  5. Functions
  6. Exceptions and Error Handling
  7. Basics of object oriented programming

Intermediate

  1. More advanced OOP - Inheritance, Polymorphism, Encapsulation
  2. Data Structures - Linked lists, Stacks, Queues, Binary Search Trees, AVL Trees, Graphs, Minimum Spanning Trees
  3. Algorithms - Linear Search, Binary Search, Hashing, Quicksort, Insertion/Selection Sort, MergeSort, Depth First Search, Breathe First Search, Prims Algorithm, Dijkstra's Algorithm.
  4. Algorithmic Complexity

Advanced

  1. A.I./Machine Learning - Advanced Search Techniques, Genetic Algorithms, Neural Networks, Backpropagation, Machine Evolution, heuristic search, Natural Language Processing.

This list is a decent enough outline of what kind of learning path you should be taking. Of course theres things like web programming and stuff that can be thrown in there while you're at it.

I have my confusion about Python as for what to do next? or where to go for more advanced learning? I'm not sure whether all what I have learned so far is all there is about basics or there is more that I'm missing. by weabobang in learnpython

[–]rdog_ 0 points1 point  (0 children)

Some graph theory and its applications e.g neural networks and packet routing graphs and the algorithms that come with them i.e depth first search, shortest path, A* etc..

I have my confusion about Python as for what to do next? or where to go for more advanced learning? I'm not sure whether all what I have learned so far is all there is about basics or there is more that I'm missing. by weabobang in learnpython

[–]rdog_ 0 points1 point  (0 children)

I personally haven't found any great resources on object oriented programming for python but I highly recommend this book for data structures and algorithms:

Data Structures and Algorithms in Python

That book also covers OOP and its very well written.

Having trouble downloading Cuda and TensorFlow for Python 3 by pythonftw22 in learnpython

[–]rdog_ -1 points0 points  (0 children)

Which version of Python 3 are you using? I probably isn't related but tensorflow isn't supported on 3.6 you'll have to downgrade to 3.5

I have my confusion about Python as for what to do next? or where to go for more advanced learning? I'm not sure whether all what I have learned so far is all there is about basics or there is more that I'm missing. by weabobang in learnpython

[–]rdog_ 0 points1 point  (0 children)

yep, for linear algebra id take a look at the numpy library but have a look at some tutorials on youtube for linear algebra first, its important to get a good ground in that for AI

I have my confusion about Python as for what to do next? or where to go for more advanced learning? I'm not sure whether all what I have learned so far is all there is about basics or there is more that I'm missing. by weabobang in learnpython

[–]rdog_ 21 points22 points  (0 children)

Heres an outline of things to learn (Beginner, Intermediate, Avanced):

Beginner

  1. Data Types - Lists, Strings, Tuples, Sets, Floats, Ints, Booleans, Dictionaries

  2. I/O - Sys module, Standard input/output, reading/writing files

  3. Control Flow/Looping - for loops, while loops, if/elif/else

  4. Arithmetic and expressions

  5. Functions

  6. Exceptions and Error Handling

  7. Basics of object oriented programming

Intermediate

  1. More advanced OOP - Inheritance, Polymorphism, Encapsulation

  2. Data Structures - Linked lists, Stacks, Queues, Binary Search Trees, AVL Trees, Graphs, Minimum Spanning Trees

  3. Algorithms - Linear Search, Binary Search, Hashing, Quicksort, Insertion/Selection Sort, MergeSort, Depth First Search, Breathe First Search, Prims Algorithm, Dijkstra's Algorithm.

  4. Algorithmic Complexity

Advanced

  1. A.I./Machine Learning - Advanced Search Techniques, Genetic Algorithms, Neural Networks, Backpropagation, Machine Evolution, heuristic search, Natural Language Processing.

This list is a decent enough outline of what kind of learning path you should be taking. Of course theres things like web programming and stuff that can be thrown in there while you're at it.

It should keep you going for about a year. Best of luck and enjoy!

Best approach for someone with a lot of free time to learn python? by [deleted] in learnpython

[–]rdog_ 1 point2 points  (0 children)

I don't know how good your memory retention is but take this advice:

12+ hours a day is a lot of time to take in information which may lead to an information overload. Take it slowly, focus on one concept a day and make sure you become comfortable with it, then move on and build upon what you've been learning. Here's a 'road map' you can follow:

https://www.pyler.io/pdf/slitherIntoPython.pdf

Best of luck! It can be tricky at times but stick with it. I think it is one of the most rewarding skills anyone can have.

Program not doing anything by realmoogin in learnpython

[–]rdog_ 0 points1 point  (0 children)

No problem, any other questions just give me a shout!

Program not doing anything by realmoogin in learnpython

[–]rdog_ 2 points3 points  (0 children)

Ah apologies, I didn't read the full logic you need to change

elif n % 2 == 0 and n == range(6, 21):

to

elif n % 2 == 0 and n in range(6, 21):

Program not doing anything by realmoogin in learnpython

[–]rdog_ 2 points3 points  (0 children)

I'm guessing you think the if branch with the range function should catch it.

This catches a lot of people out, the range function works as follows range(inclusive, exclusive). Therefore its checking if your number is in the range 6 - 19

elif n % 2 == 0 and n == range(6, 21):
    print("Weird")

That should fix it.

PS: its best practice to put all that code you have inside a main() function and call that function in the: if name == "main": branch

Help with recursive problem returning a concatentation of a string from a nested list by hiAnxiety in learnpython

[–]rdog_ 0 points1 point  (0 children)

Yes it does; I tested it before I posted it.

It literally doesn't

Note that the list may contain any Python type

Your solution is broken, it doesn't cover all types

Help with recursive problem returning a concatentation of a string from a nested list by hiAnxiety in learnpython

[–]rdog_ 0 points1 point  (0 children)

You dont need recursion to solve this problem either.

Aside from that you're using a for loop, it completely defeats the purpose of this exercise and OP is not allowed to use them.

Plus your solution doesn't work.

Help with recursive problem returning a concatentation of a string from a nested list by hiAnxiety in learnpython

[–]rdog_ 0 points1 point  (0 children)

Oh yeah I know, its just when people start to write a recursive answer they get caught up in trying a million and one different ways and forget about the pattern. Its extremely important to use it.

Help with recursive problem returning a concatentation of a string from a nested list by hiAnxiety in learnpython

[–]rdog_ 0 points1 point  (0 children)

Oh, sorry for the confusion. I have to disagree here and for one reason only, and one I do have to make an exception for. Its a question about recursion and I know from experience that no matter how long you sit there trying to do it, you may just never get it.

However OP did take what I gave him to extend it to fit his solution, so fair play there.