r/AskProgramming • • 2d ago

Python Help needed for schools python learning

so a little of context i have computer science as a subject in grade 12 , and in it i have to study python , sql , stack and python connectivity with sql . i have managed to study sql but im struggling with python all i know is print("hello world") , i dont know if this is the right place to post this but help will be really appreciated . also i cant give it much time sadly coz i have subjects like physics chem and maths hanging in my neck . max i can give is 45 mins a day and i have to do it in under a month .

these are all the topics i need to learn

  • Basics: Tokens, keywords, identifiers, literals, variables, data types, operators, and type conversion.
  • Control Flow: Conditional statements (if, elif, else) and loops (for, while, break, continue).
  • Strings: Indexing, slicing, traversal, and built-in string methods.
  • Lists, Tuples, and Dictionaries: Creation, indexing, slicing, mutability vs. immutability, traversal, and built-in functions/methods.
  • Standard Modules: Importing and using math, random, and statistics.
  1. Functions
  • Types of Functions: Built-in functions, functions defined in modules, and user-defined functions (def).
  • Parameters & Arguments: Positional arguments, default parameters, and keyword (named) arguments.
  • Return Values: Returning single or multiple values (return statement) vs. void functions.
  • Scope of Variables: Global scope vs. local scope and the global keyword.
  1. Exception Handling
  • Error Types: Syntax errors, runtime errors (exceptions), and logical errors.
  • Built-in Exceptions: ZeroDivisionError, TypeError, ValueError, IndexError, KeyError, FileNotFoundError, IOError, etc.
  • Handling Blocks: try, except, else, and finally clauses, along with raise and assert statements.
  1. File Handling
  • File Types: Text files (.txt), binary files (.dat), and CSV files (.csv).
  • General File Operations: open(), close(), with statement, and file access modes (r, r+, w, w+, a, a+, rb, wb, ab, etc.).
  • Text Files: Reading (read(), readline(), readlines()), writing (write(), writelines()), and file pointer manipulation (seek(), tell()).
  • Binary Files: Serialization/deserialization using the pickle module (pickle.dump() and pickle.load()).
  • CSV Files: Reading and writing tabular data using the csv module (csv.reader(), csv.writer(), writerow(), writerows()).
  1. Data Structures (Stack)
  • Stack Concepts: Linear data structure and LIFO (Last-In, First-Out) principle.
  • Stack Operations: Implementation using Python lists (push via append(), pop via pop(), peek/display, and underflow/overflow checks).
  1. Python–Database Connectivity
  • MySQL Interface: Connecting Python to a MySQL database using mysql.connector.
  • Query Execution: connect(), cursor(), execute(), parameterized queries (%s or .format()), commit(), fetchone(), fetchmany(), fetchall(), and rowcount.

THANKS A LOT FOR READING

0 Upvotes

14 comments sorted by

1

u/No_Pie_1319 2d ago

I assume you have much time before the final exams, so you can prepare slowly.

Try executing a few codes yourself in a computer so that the jargon becomes meaningful. Then try to read the theory.

Computer Science in CBSE was very easy for me and I was able to score good without much effort.

1

u/timepassr 1d ago

I can prepare slowly but I also have to go for other exams like jee so I'm not trying to stretch it much coz I alr made a mistake of taking it lightly

1

u/Boward-Evercuz86 1d ago

Bro code on youtube is AWESOME it covers much of what you mentioned here. And I hope that you have some time to learn that stuff. Because you really could have just said "they want me competent in python development end-to-end" Tall order for a highschool assignment but hey. I'm here for it. Best of luck going forward dude. I hope you crush it 💯️ Youtube bro code: https://www.youtube.com/@BroCodez

1

u/timepassr 1d ago

Thanks bro ❤️‍🩹

1

u/KingofGamesYami 2d ago

Khan Academy was my go-to for supplementing k-12 instruction back in the day. It looks like they have course content on Python.

1

u/TheMrCurious 2d ago

Reddit, when the AI improve their posting skills.

1

u/Amku03 2d ago

This video while 1 hour long covers all the basics and scratch lets you understand stuff without the syntax.

1

u/0Huy 2d ago

45 minutes a day for a month is about 22 hours: potentially enough for an exam-level grasp of these basics, though not mastery. The topics connect in a manageable chain—types and control flow, strings and collections, functions, files, then SQL connectivity. The database section is the part most likely to need extra setup time.

1

u/Boward-Evercuz86 1d ago

Oh also, Advent of Code is going on right now. you can tackle those challenges with Chat gpt and ask it for guidance on how to solve the problems. I normally don't recommend people use Ai for that if they are trying to learn. But considering you are very new to this. I think it would only be beneficial if you use it right.

0

u/[deleted] 1d ago

[deleted] — view deleted comment

1

u/pLeThOrAx 1d ago

Basically,: Open Derek Banas on YouTube,, and don't just learn python. How do you know what a toaster is? Because you don't just have words for toaster, you have the visual understanding, you can feel and touch it, you can use it to make toast, you can feel and experience the result: there is more to a toaster than the word toaster... Similarly if you want to understand concepts you need more than one way to understand it, e.g, "I know what variables are because I understand that in x language they appear like this and in y language you use const and var..." Learn JavaScript alongside python and it will help you understand the concepts better. Just spend 40 minutes practicing the concepts you need to learn in a different language should help grasp the basics. Velocidade, trinidade, velocity, trinity, when we take the basic patterns of language and look for the commonality it makes understanding in both easier :-)👍

1

u/Boward-Evercuz86 1d ago

Ayyee say it louder for the folks in the back! haha solid advice G