Jump to content

Has anyone else learnt to code by printing patterns using nested loops?

 

So idk how to explain this, but have you guys ever while learning programming tried putting two loops together like and went "mon check this out", pretty cool right?

 s=input("enter your name here")
    for i in range (0,len(s)+1):
        for j in range(0,i):
            print(s[j],end=" ")
        print("\n",end=" ")

now in India (I tried to find if this is how they teach nested loops anywhere else and I coukdn't fund a single beginners course with these kinda patterns that originate outside of India so I'm assuming it maybe exclusive) programs like these but on stereoids are used to teach nested loop concepts and I kinda liked them at first when I started to learn to code in QBasic but later on as I kept switching languages having to learn them felt so fucking annoying that at some point I just fucking hated them

image.thumb.png.368c32deaca02a257036415cdd5ed235.png

 

now the thing is I had computer science and programming in school from 6th grade and we started out with QBasic and then even tried html css js and all, even did some java and c++, also visual basic was fun too along the way, but then in 9th grade my school touched python, and was stuck with that for the rest of my life and now I'm in colllege, I had fun doing those things and I always topped the class in computer science, and since I also had a love for video games, back then I had decided game devlopment and computer science is what I wanna do when I grow up,

but I still fucking hated these programs, like whyyyyyyy, I understand that you use the outer loops for rows and inner loops for column, but okay, whats the real world application of doing 80 of these? the last time I saw them was in 11th grade exams and I raged out inside my mind, and then I learnt functions and libraries and all in python and also some sql so happily away from them (I still am yet to learn object class oriented stuff).

 

 

But the thing with Indian education, job market, and society is parents dictate everything for their kids, and those parents having a 2 generations gap, or doing some other profession that has remained unchanged or even worse, retired, have no god damn idea what the actual hell is going on in the market and just force their kids to study whatever everyone else is studying which is whatever is trending and "rumoured to have" money for the last 2 decades, earlier it was working for the government as civil servant from like 50-80s then 80s-2000s it was medicine law and stuff, and from 2000s it became engineering, and eventually with internet and computers, it became computer science engineering.

So I wanted to take a gap year and study more stuff by online resources and try to apply for some college away from my home, but my parents didnt like that and now I'm in a college which I also kinda hate for a variety of reasons.

Now another thing is in India, not all schools teach computer science until 11th grade, where it is a subject given by the board, and you can swap it out for either maths or biology (which is what I did cuz I didnt want to be a doctor) usually people that have some determination take physics chemistry math with computer science, cuz they wanna study engineering or take physics chemistry biology and psychology cuz they wanna study medicine, some take computer science with bio too as they wanna be a doctor but would also just wanna learn how to code for just fun sakes. Some take physics chemistry maths and bio just because they love science.

 

But some people do the last option not because they love it but because their parents are forcing them to do so just in case being a doctor fails, what are they gonna do then? God damn engineering? and what kinda engineering? Computer science cuz that's where they think the money is, saturating the market for the rest of us and stagnating the freshers pay in IT to $3000 per year. 

 

but I digress, coming back to my topic the problem is in my college, 65% of students are of the last category and they've never written a single line of code in their life, a significant few don't even know what the CMD does in Windows (they said they saw it for the first time in their lives when I ran some pip install commands for them as they had some issues while installing python on their laptops), and sooo.

 

My college is now teaching the stuff I have already learnt in 9th-10th-11th-12th grade AGAIN, so yeah, those things I kept ranting about, gotta deal with them AGAIN, yes they're really easy if you understand basic stuff and thought process, but pleas why cant they just teach me object oriented already 😭😭😭😭😭😭😭 

 

 

	s=69
    for row in range (1,s+1):
        for space in range(s-row):
            print("  ",end="")
        for col in range(1,2*row):
            print("😭",end="")
        print("\n",end="")

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×