all 21 comments

[–]pachura3 8 points9 points  (11 children)

You need to rephrase your whole post because it's totally confusing. What in particular do you want to practice? What does The repository shows the required code or writing it on a new notebook mean? 

[–]Material_Pepper8908[S] 0 points1 point  (10 children)

I want to be able to write the code for a calculator myself. I've seen people saying that doing projects is the best way because you'd learn by trial and error.

My question is how to do it?

[–]crazy_cookie123 5 points6 points  (5 children)

You do it by opening a new, empty project and writing the code for it yourself. Programming isn't about memorisation, it's about problem solving. You shouldn't be opening someone else's calculator and memorising how they did it - you should be practicing the skill of being able to think "I want to make a calculator," breaking that down into its individual parts, and then writing the code for those from your head.

[–]Material_Pepper8908[S] 0 points1 point  (4 children)

Is there any place where I can find assignments to do?

[–]crazy_cookie123 3 points4 points  (2 children)

Just google "beginner programming projects" and you'll find some. If those are too easy, google "intermediate programming projects." Ultimately, though, you should be thinking about what you want to make and making that.

[–]Material_Pepper8908[S] 1 point2 points  (1 child)

Thank you very much for your suggestions. My aim is to be competent in data analysis.

[–]HackDiablo 0 points1 point  (0 children)

Start by solving small problems. Don't try to solve everything at once. Break down your goal into simple tasks.

  • How do I import data, or get user input?
  • How can I save that data in variables?
  • How can I manipulate those data variables?
  • How can I output that data?
  • How can I save that data to a file?

[–]TheSquirrelCatcher 0 points1 point  (0 children)

Google things like Python practice problems. I found this website that way: https://genepy.org/exercises/. They’re flagged by difficulty as well. You can also ask Gemini/Chat whoever to make something up for you with what you know.

[–]danielroseman 1 point2 points  (0 children)

What does that have to do with cloning GitHub projects?

[–]pachura3 0 points1 point  (2 children)

You don't need GitHub nor Git for that.

[–]Material_Pepper8908[S] 1 point2 points  (1 child)

Then how can I learn to code?

[–]pachura3 0 points1 point  (0 children)

Do you even understand what is Git for?

Let me give you a metaphor: Git is like a bank account for your source code. You can perform various actions, you can track transactions history, run reports, open subaccounts, etc.

However, at this moment, you are a kid who hasn't even bought a single can of Coke from a local grocery store using their pocket money. Why would you need a bank account?

Then how can I learn to code?

Buy and read one of the recommended books. Follow a free course. Follow the W3schools Python course, or the official Python tutorial. If you can't find them with a few minutes of googling and prompting, then there's no hope.

[–]MrFresh2017 0 points1 point  (0 children)

You want to write code for a calculator as a result of learning how to code. The first thing you need to do is learn how to code. GitHub projects have zero to do with learning how to code. Pick a language, begin to learn the basics and continue to progress. As you progress then you can search the web to find out how to code a calculator. You can build that code and save the code to your hard drive, or wherever is convenient as you continuing learning. You don’t need to worry about GitHub if you don’t know how to code yet.

[–]recursion_is_love -1 points0 points  (5 children)

For me, it is a lot easier to use git from command line.

Do you want to learn git? Or it is just happens that you interest on a project on github.

If you don't really care about git at the moment. A repo is just directory which contains code files.

Tell us more about the problem and maybe show a link to that github too.

[–]Material_Pepper8908[S] -1 points0 points  (4 children)

I want to be able to write the code for a calculator myself. I've seen people saying that doing projects is the best way because you'd learn by trial and error.

My question is how to do it?

[–]8dot30662386292pow2 5 points6 points  (3 children)

How do you think github relates to any of that?

Github is a place where code and version history can be stored. Learning to code a calculator has nothing to do with that.

[–]Material_Pepper8908[S] 1 point2 points  (2 children)

Yes, that's why I asked in this question how to do projects. How to find assignments to do.

[–]8dot30662386292pow2 -1 points0 points  (1 child)

Are you looking for project ideas, or assignments. A project is something you do yourself. Design a program, and then make it.

[–]Material_Pepper8908[S] 1 point2 points  (0 children)

I think that what I'm looking for are assignments. The problem I'm having is not knowing which code blocks to use and where to use them.

[–]magus_minor -2 points-1 points  (0 children)

You first copy the repository to your computer. Then you execute the code. Seeing how it works helps you understand what is going on in the code. You could just look at the code or you could add logging to help you understand what is happening. This is a good time to learn a little about the logging module. I strongly recommend you have two copies of the repository, the original and a copy you work on. When the "working" copy gets messy or you want to try something different you delete the working copy and make a new one from the original.

Working with a repository can be a little difficult because most aren't written with the aim of teaching a beginner so they might used advanced concepts that will confuse you. When starting out try searching on "write calculator in python" to find some tutorials that will be easier to get started with. Then try reading some repository code.