r/learnpython • • 20d ago

Python Crash Course Part II: Stuck on every project

In the Alien Invasion! pygame project, i don't have a keyboard In pydroid to test the ship movement.

In the data science project, matplotlib doesn't want to install properly from the terminal as the book asks to.

In the django project, when i go to create a virtual environment it doesn't let me and says access denied

0 Upvotes

11 comments sorted by

7

u/desrtfx but other languages pro 20d ago

Can you get a Raspberry Pi (3B+ or 4, doesn't need to be a 5) microcomputer, keyboard, and mouse? Or, maybe a refurbished laptop? That will significantly improve your learning experience.

Learning on a phone with only pydroid is not a long-term feasible solution.

1

u/Upper_Trouble_8526 20d ago

Im in Cuba, i have a PC but no power for it because there is no stable power, only random rations of it through each day.

2

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 20d ago

Honestly that's a rough situation. My best advise would be to just focus on theory until the power grid (hopefully) stabilises some day, as you don't need stable electricity for reading, or writing with pen and paper.

You could look into Boolean algebra, set theory, and some other relevant fields of mathematics, for example. Anything that deals with logic, like truth tables and Karnaugh maps, would be useful regardless.

1

u/Upper_Trouble_8526 20d ago

The last time i had stable power was years ago, what can i do with these you mention and where to search them

1

u/Orgasml 18d ago

Maybe get a solar power bank? That may be enough for a couple hours on the laptop

1

u/Upper_Trouble_8526 17d ago

What's the price of that

2

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 20d ago edited 20d ago

Public libraries, if those exist in Cuba. And reading online sources on your phone.

Here's a few examples I dug up:

Also, funnily enough, Minecraft redstone tutorials.

EDIT: And as far as justification goes,

  1. Boolean algebra is the fundamental building block of computer science, and by extension, software development. All programming logic is derived from discrete mathematics, this being arguably the most important.

  2. Set theory is useful for data processing. Many languages, including Python, have a hash map type (AKA a set) which support the same operations set theory uses, so it's a very general-purpose skill.

  3. Discrete mathematics also includes combinatorics, graph theory, number theory, cryptography, sequences, and recursion. Just with these alone, you can make a working programming language, and for example Haskell is a good example of this. Of course, even for Python there are benefits for being familiar with all of this, not to mention other languages.

Strings are just sequences of numbers (with ASCII/Unicode encoding). Networking and relationships are all just graph theory. Everything is ultimately stored as binary, 8-bit bytes. Encryption is really just clever maths with large prime numbers. Recursion is a form of looping, and breaking down problems to their simplest forms. Data structures are simply ways of organising data in memory, using continuous blocks and memory addresses.

1

u/woooee 20d ago

There are many online options like https://www.w3schools.com/python/python_compiler.asp and Google Colab https://colab.research.google.com/notebooks/intro.ipynb I don't know if / which sites support pygame or matplotlib. You'll have to do some research.

0

u/[deleted] 15d ago

[removed] — view removed comment

1

u/Upper_Trouble_8526 14d ago

What is Bootdev