Тёмный

#23 Python Tutorial for Beginners | Printing Patterns in Python 

Telusko
Подписаться 2,3 млн
Просмотров 1,3 млн
50% 1

Telusko Courses:
Spring and Microservices Live Course : bit.ly/springmslive
Coupon: TELUSKO25 (25% Discount)
Industry-Ready Java Spring Microservices Developer Live : bit.ly/JavaMS2
Complete Java Developer Course : bit.ly/Comp-Java-Dev-2
Coupon: TELUSKO20 (20% Discount)
Udemy Courses:
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
Java For Programmers:- bit.ly/javaProgrammers
For More Queries WhatsApp or Call on : +919008963671
website : courses.telusko.com/
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
TELUSKO Android App : bit.ly/TeluskoApp
In this lecture we will learn:
- How to implement the logic for pattern printing?
- Pattern printing through python
- Print the pattern of a square
- Print the pattern of the right triangle and reverse right-triangle
- Different approaches to printing a pattern
#1
- Pattern printing improves logical thinking capability.
- Programming is all about solving the problem, we have to understand the problem statement and wrote code for it.
- A pattern can be printed in many ways.
- We can print multiple hashes(#) in a single statement as a string.
- If you are allowed to print only hash in a statement at a time, then you have to write the same print statement multiple times.
- On writing a statement multiple times, it will give an output in a column.
- To convert a column output into a row format, we can use the end=" "parameter in every statement.
- To will restrict the cursor to move on a new line and hashes(#) will be printed in a single row.
#2
- Instead of writing the same code multiple times, we can use a for a loop.
- For a range(n) in a for loop, it will start from 0 and end at (n-1).
- We can use two loops, for printing two rows separated by a new line.
- For printing multiple rows, we have to write the same for loop code repeatedly.
- So, we can write the above for loop block inside another outer loop.
- In nested loops, an outer loop contains a variable that represents the number of rows and an inner loop contains a variable that represents the number of columns.
#3
- We can apply the concept to different patterns in a similar way.
e.g., for printing a right -triangle, we can restrict the inner loop till the value of a number of rows.
- For the reverse of the right triangle, we can restrict the inner loop till (n-i), where i is the number of rows.
Python Tutorial to learn Python programming with examples
Complete Python Tutorial for Beginners Playlist : • #1 Python Tutorial for...
Python Tutorial in Hindi : • #1 Python Tutorial | I...
Github :- github.com/navinreddy20/Python-
In this video we will see:
- Printing patterns
- Using loop
- For loop
Python for Beginners :- bit.ly/3JOLQhl
Editing Monitors :
amzn.to/2RfKWgL
amzn.to/2Q665JW
amzn.to/2OUP21a.
Editing Laptop :
ASUS ROG Strix - (new version) amzn.to/2RhumwO
Camera : amzn.to/2OR56AV
lens : amzn.to/2JihtQo
Mics
amzn.to/2RlIe9F
amzn.to/2yDkx5F
Java:- bit.ly/JavaUdemyTelusko
Spring:- bit.ly/SpringUdemyTelusko
More Learning :
Java :- bit.ly/3x6rr0N
Python :- bit.ly/3GRc7JX
Django :- bit.ly/3MmoJK6
JavaScript :- bit.ly/3tiAlHo
Node JS :- bit.ly/3GT4liq
Rest Api :-bit.ly/3MjhZwt
Servlet :- bit.ly/3Q7eA7k
Spring Framework :- bit.ly/3xi7buh
Design Patterns in Java :- bit.ly/3MocXiq
Docker :- bit.ly/3xjWzLA
Blockchain Tutorial :- bit.ly/3NSbOkc
Corda Tutorial:- bit.ly/3thbUKa
Hyperledger Fabric :- bit.ly/38RZCRB
NoSQL Tutorial :- bit.ly/3aJpRuc
Mysql Tutorial :- bit.ly/3thpr4L
Data Structures using Java :- bit.ly/3MuJa7S
Git Tutorial :- bit.ly/3NXyCPu
Donation:
PayPal Id : navinreddy20
www.telusko.com

Наука

Опубликовано:

 

14 июл 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 2,1 тыс.   
@AmarjeetKumar-do7iz
@AmarjeetKumar-do7iz 5 лет назад
I can bet that no courses can be better then this even that is paid. I have purchased almost 5-6 courses form udemy but i couldn't find anyone better then this. A huge thanks to Mr Naveen Reddy Sir for providing this awesome courses and sir we really appreciate you for providing us such valuable resources.
@khairahammed5187
@khairahammed5187 5 лет назад
even i had some paid courses of udemy but this is the best ......
@sss2393
@sss2393 4 года назад
Riyaz mhd hats off*
@krishneshchaurasia9804
@krishneshchaurasia9804 4 года назад
@@sss2393 lol
@vasanthkumar-rq5cw
@vasanthkumar-rq5cw 4 года назад
Yes,sssssssssssss
@danielkamau8436
@danielkamau8436 4 года назад
sure he is out to create people's mind by removing litter of technology in our mind, thank sir
@vijaychaurasiya3227
@vijaychaurasiya3227 5 лет назад
str1='ABCD' str2='PQR' for i in range(4): print(str1[ : i+1 ] + str2[ i : ])
@rjroumo5722
@rjroumo5722 5 лет назад
Too good and easy method just loved it
@suleymantekir3570
@suleymantekir3570 5 лет назад
that's great :)
@sonikunj696
@sonikunj696 5 лет назад
Dont understand it properly... What does that statement means Print(str1[:i+1]) :
@suleymantekir3570
@suleymantekir3570 5 лет назад
@@sonikunj696 it means from zero index to i+1 index all element.namely as range(0,i+1)
@mdsharique9685
@mdsharique9685 4 года назад
@@sonikunj696 this sign defines interval i.e if u want to go from begining to 4th one element in the list, then u have to use like [ :5]
@panakitikos
@panakitikos 4 года назад
that man needs much more recognition , seriously i learned from this guy in a couple of months what i learned from college in one academic year , not just in python , but his other topics and his logic
@golshanswonderland8906
@golshanswonderland8906 3 года назад
I have started learning Python using this course and I can tell it is simply amazing! Thank you Navin! Short videos which are all easy to follow is the key of success of this course. I love it.
@rizwanshaikh624
@rizwanshaikh624 6 лет назад
Awesome... Better than paid courses...
@ajithsdevadiga1603
@ajithsdevadiga1603 5 лет назад
exactly
@harshavardhandsh5190
@harshavardhandsh5190 5 лет назад
I don't know if there is any paid courses as I am new on Net
@arulrajenth8543
@arulrajenth8543 4 года назад
Yes
@mrjh8467
@mrjh8467 4 года назад
The reason for learning this explained in 45 seconds. This is hat I have found gold with Navin's videos, in addition the the solid walk through.
@nishantchandraazad1650
@nishantchandraazad1650 Год назад
Great Teacher I got in RU-vid ,the best part you have mention "we don't teach we educate" it is actual true , I really enjoy your videos ,Thanks for teaching
@AnkushMalode10
@AnkushMalode10 3 года назад
1) for i in range(4): for j in range(4-i): print (i+j+1,end=' ') print()
@jatinmakwana3037
@jatinmakwana3037 2 года назад
Dimag hi nahi chal raha hai aisa
@laksh._.official
@laksh._.official 2 года назад
Sb indentation ka khel hai
@prathikkundaragi9523
@prathikkundaragi9523 5 лет назад
I'm a beginner.I liked the way he teaches. Started watching his videos in the morning 11 a.m and now reached 21st video by this time on the very same day. wonderful job sir.Nobody can teach the way he teaches.
@PiyushSharma-hy2ej
@PiyushSharma-hy2ej 6 лет назад
1st pattern:==> for i in range(1,5): for j in range(1,5): k=i+j-1 if k>4: print("",end="") else: print(k,end="") print() 2nd pattern:==> x='ABCD' y='PQR' for i in range(1,5): print(x[:i]+y[i-1:])
@ritiksingh6137
@ritiksingh6137 4 года назад
Trust me it's much better than any paid course's . Truely appreciable work. Thanks sir for giving such type of knowledge 🙂
@nikhilpn764
@nikhilpn764 3 года назад
1.for i in range(1,5): 2. for j in range(i,5): 3. print( j , end=" ") 4. print()
@almirkazaferovic4041
@almirkazaferovic4041 2 года назад
i dont understand the second print, whats that for?
@_harshasgowda_
@_harshasgowda_ 2 года назад
@@almirkazaferovic4041stands for new line
@anirudhani4997
@anirudhani4997 2 года назад
@@_harshasgowda_ tq brh 😜
@ranjeetraj3519
@ranjeetraj3519 5 лет назад
#Solution for 2nd problem for i in range(4): for j in range(4): if(i
@akifkhan2966
@akifkhan2966 5 лет назад
Nice thinking
@vamsimanchikanti9399
@vamsimanchikanti9399 5 лет назад
good work
@malekvajid1663
@malekvajid1663 5 лет назад
How to work this code plz understand me how to implement this logic plz help me🤔🤔
@moazelsawaf2000
@moazelsawaf2000 5 лет назад
You are intelligent ❤
@moulavb3932
@moulavb3932 5 лет назад
Very good.....
@saivamsi340
@saivamsi340 3 года назад
Ur debugging part is the best visualisation i have ever seen. Thank you for putting such an effort in this course.
@sajidmustafa5165
@sajidmustafa5165 3 года назад
I am watching this course 2 yrs after the date it was uploaded but it still seem to be up to date. Awesome teacher and very well explained. Can watch your videos whole day. Thx for this course and for helping us learn.👍👍👍👍
@surajsoni4061
@surajsoni4061 4 года назад
your teaching style is really different from others and you are awesome . keep teaching like this you are crushing it through your coarse.
@Edussentials
@Edussentials 4 года назад
Naveen Sir, You have a wonderful way of teaching..I will always remember you for the change you have made in my life. Learning any Programming language was always so boring and challenging task for me but now I always look forward to your python series as I find it very easy and interesting. God bless you, Sir!
@obiciaga
@obiciaga 4 года назад
this guy is so good and the course is free oh my days. Learned so much from you thanks so much
@nikhil1303
@nikhil1303 4 года назад
These sessions are really well articulated and explained to a newbie!
@VetinCloud
@VetinCloud Год назад
How colleges dont license this dude is beyond me, in depth explanation barney style, thank you for taking the time to do this.
@englishwithshamim7676
@englishwithshamim7676 5 лет назад
Navin, you saved me. I owe you, sir. You don't know that you are my guide.
@darshanvenkataramanan1785
@darshanvenkataramanan1785 3 года назад
and, now he knows it 🙂🙂.
@varunakavoor
@varunakavoor 5 лет назад
This is way better than some paid courses. Thank you Navin Sir. :)
@brodycates8472
@brodycates8472 4 года назад
I've watched a 6 hour course and used sololearn and this was never properly explained. You explained perfectly. I commend you
@dhruvdutt2749
@dhruvdutt2749 3 года назад
You definitely saw Mosh classes
@mysteri0us_998
@mysteri0us_998 3 года назад
i know the sololearn pain
@brodycates8472
@brodycates8472 3 года назад
@@mysteri0us_998 they give you a pretty decent framework, but the application isnt taught well imo
@mysteri0us_998
@mysteri0us_998 3 года назад
@@brodycates8472 ok
@mysteri0us_998
@mysteri0us_998 3 года назад
i can understand i couldnt understand object oriented programming , generators and stuff from that course
@helengao2124
@helengao2124 3 года назад
Finally find a video that can explain this!!!!! This is literally way way way better than my lectures
@itsaclickbait4592
@itsaclickbait4592 4 года назад
Ultimate teacher, don't know how to pay gratitude... Sir, better than any paid course... 🥰
@franzbiberkopf9179
@franzbiberkopf9179 3 года назад
You are a very good and passionate teacher. Indian people are the best in programming! Greetings and respect from Rome, Italy.
@wedynnoronha8957
@wedynnoronha8957 3 года назад
Amazing Series Navin Sir, thoroughly enjoyed it.Kudos!
@angadsingh6764
@angadsingh6764 Год назад
Now I am getting this in my brain exactly just one day before my exams but now I am understanding every point and now I am gaining some confidence and if I will be practising this type of things ,my logic building will increase .
@sameer281187
@sameer281187 5 лет назад
for i in range(1, 5): for j in range(i, 5): print(j, end=" ") print()
@00TheDoctor
@00TheDoctor Год назад
You are an absolute legend, thanks so much for taking your time to do this. I actually understand for-loops now.
@akashdoijode04
@akashdoijode04 2 года назад
Wow !!! Just fabulous !!! I was postponing to learn python till date but after coming accross your series I am gaining much interest to keep learning through your videos. Thanks and a big hug for making this series Sir.👏👏
@thilinasenadheera6617
@thilinasenadheera6617 4 года назад
Dear Sir. This is a very valuable series. I got the same result with below code. for i in range(4, 0, -1): # starting each row from the heighest size for j in range(i): # Printing each column inside each row according to row size print("#", end="") print() # Printing a new line to start a new row Please do more stuff like this. Respect from a SriLankan..............!!!!
@rajeevchaudhary1163
@rajeevchaudhary1163 7 месяцев назад
By far the best technical teacher I have seen. Navin, keep your passion for technology and teaching going. You have a gift and you are a gift!
@shalakagaikwad8813
@shalakagaikwad8813 3 года назад
Learning from your Python series for a job switch. I have been following you since college. Whenever I need help in coding, I watch out your videos. Thank you very much, Sir!
@ankurpoddar3196
@ankurpoddar3196 2 месяца назад
Yuup
@anshitasingla2334
@anshitasingla2334 Год назад
Ohh myy godd u just made it so simpler, i even don't know when it starts and when it ends. U r amazing seriously learning language(patters....) With no recognition... 👍👍
@anusreeanoop4459
@anusreeanoop4459 4 года назад
#1 For i in range (1,5): For j in range (i,5): Print(j,end="") Print() #2 a="ABCD" b="PQR" for i in range (4): For j in range (3): Print(a[0:i+1],end="") Print(b[i:j+3],end="") Break Print()
@jssriharijaikumar7473
@jssriharijaikumar7473 Год назад
can you pls explain this line of code print(b,[i:j+3],end="") when i debug this the value of j remains 0 till the end of the loop
@SarbajitDey
@SarbajitDey Год назад
@@jssriharijaikumar7473 Yes, I also want to know the logic behind this.
@RAJKUMARK-rj7yx
@RAJKUMARK-rj7yx 9 месяцев назад
@@SarbajitDey @jssriharijaikumar7473 range function always starts at 0 . That's why the j value remains 0 till the end of the loop
@boyanghu1222
@boyanghu1222 8 месяцев назад
I think there is no need for j in the sixth line just i:3 is fine and this solution have no blank space in a and b list. I have a better one: a = "APQR" b = "ABCD" for i in range(4): for j in range(i+1): print(b[j], end=" ") for k in range(j, 3): print(a[-(3-k)], end=" ") print()
@imissedthepartwherethatsmy9305
@imissedthepartwherethatsmy9305 7 месяцев назад
​@@boyanghu1222bro that's so clever Can u please tell me how to reach this level of reasoning Does it come with practice or do I have to be gifted to crack it Please respond if possible
@adriaanmeij8336
@adriaanmeij8336 Год назад
For the reverse I used range and gotten the same result which is pretty cool. Code: for i in range(5,0,-1): for j in range(i): print("# ", end="") print()
@sriabhirammuthadi4249
@sriabhirammuthadi4249 Год назад
I used this: x=4 while x>0: for i in range(x): print('# ',end="") print() x-=1
@unknownme7177
@unknownme7177 Год назад
@@sriabhirammuthadi4249 smort 🗿
@sukumarvijayakandeepan1327
@sukumarvijayakandeepan1327 3 месяца назад
From Tamilnadu, Thanks a million to you to explain in such a great way. Love you brother Navin reddy, Now a days addicted to watch about your python videos
@ezazq9876
@ezazq9876 3 года назад
you are just awesome man, i struggled too much to understand behind the seen of for loop, while working with patterns but none of the videos gave me the simplest explanation as you did. lots of Duaas for you
@rickygupta7543
@rickygupta7543 4 года назад
FOR 1st pattern for i in range(5): for j in range (4-i): print(j+i+1,end =" ") print()
@kaushalchaudhary9204
@kaushalchaudhary9204 4 года назад
for 1 ques for i in range(4): for j in range(4-i): print(j+i +1, end=" ") print()
@bitboxtv_7713
@bitboxtv_7713 3 месяца назад
Thanks bro, from Afghanistan 🇦🇫
@TankUSA
@TankUSA Год назад
As a person that is entirely analogue, I just want to say thank you for helping me understand this subject a little better.
@dilipxspace
@dilipxspace 3 года назад
Tomorrow I have an interview, Thank you sir for all these videos these lectures are better than any paid course or coaching.
@tapand82
@tapand82 4 года назад
Bro you are just awesome! you made learning python so easy, your energy level and presentation is so good
@letsviraltoday
@letsviraltoday 4 года назад
If you understand in a batter way.. Can u help me out I am getting an error msg in print("#",end="") print("#",end="")
@arunrajak.b9170
@arunrajak.b9170 4 года назад
@@letsviraltoday add a print() in last line if you use end=" "
@Anjalisharma-ic2sl
@Anjalisharma-ic2sl 3 года назад
@@arunrajak.b9170 thank u
@alkadixit5576
@alkadixit5576 3 года назад
Answers: Asgn1: for i in range(1,5): for j in range(i,5): print(j,end=" ") print() Asgn2: x='ABCD' y='PQR' for i in range(4): print(x[:i+1]+y[i:])
@alisabir2440
@alisabir2440 3 года назад
can yo please explain this 2nd assingment logic use in print
@afrozkhan.
@afrozkhan. 3 года назад
@@alisabir2440 Debug the program Or write that print statement in idle U will understand....
@alisabir2440
@alisabir2440 3 года назад
I actually don't understand it I did debug but that print statement I get confused
@akshaypathak8280
@akshaypathak8280 3 года назад
what will be the code for asgn 1 if the pattern is in reverse order
@suramvinay2849
@suramvinay2849 3 года назад
@@akshaypathak8280 for i in range(1,5): for j in range(5-i,5): print(j,end=" ") print()
@seshasai7348
@seshasai7348 2 года назад
That's really fantastic master. Currently my platform is uipath but I have interest to learn more technologies. So finally I decided to learn python. So in that RU-vid is doing much favor the guys who want to learn anything. So in that you crated a good platform to learn a python such a easy way and very logically. Thank you very much Master. Finally my conclusion is in any schools, colleges and any where the persons who are being like you then every one will became a great learner and they will reach their goal.
@lifelineallah8893
@lifelineallah8893 3 года назад
hi sir u are teaching is at a different level .if i dont understand any concept i always prefer to see ur vedios . Really satisfied with ur teaching thank u soo much for ur efforts sir .
@edwinbenny1211
@edwinbenny1211 4 года назад
I can feel my brain get LARGER!
@gauravbisht9622
@gauravbisht9622 4 года назад
@lakshmi prasanna At the end of the vid..
@bluemeet8546
@bluemeet8546 3 года назад
@lakshmi prasanna hey where you find the assignment I am also struggling to find the assignment if you know please tell me
@linuso77
@linuso77 3 года назад
@@bluemeet8546 7:42 just pause vha dikh jayega top
@danielkamau8436
@danielkamau8436 4 года назад
Sure this guy will take my big, I mean big pocket soda when I reach him out, I pledge to touch a life like he has done to me. will mentor whole good individuals courtesy of Neveen and the team.
@amrutharamesh1097
@amrutharamesh1097 2 года назад
Really love the way you teach. I could learn faster and understand the concepts well..Appreciate your efforts 👍
@akshitstenaa
@akshitstenaa 4 года назад
I love all your videos , you make things just so simple & beautiful , thank you brother
@gopisettyyugandhar458
@gopisettyyugandhar458 5 лет назад
2) x,y='ABCD','PQR' for i in range(4): print(x[:i+1]+y[i:])
@praveenkumar-jx8iz
@praveenkumar-jx8iz 4 года назад
Perfect
@gowthamkumar4622
@gowthamkumar4622 2 года назад
How does last line worked
@db-ui8bw
@db-ui8bw 3 года назад
Navin, your videos are simply superb. They are short with full of content. A small suggestion though. When watching on a mobile the font looks very small. Zooming into the coding area and changing the background color can lessen the strain on eyes. Thank you once again for the great videos.
@jeeva_nantham
@jeeva_nantham 3 года назад
Hearty thanks to sir Navin reddy!! Thanks for making this wonderful tutorial video...!!! ❤️
@balrampatel1014
@balrampatel1014 Год назад
what an awesome explanation, the way you break the steps 1 by 1 to let every noob understand the rhythm of loop, excellent work here, hats off to you Sir. I liked the way you went from bottom to top, like no body does this way. what a great Teacher. Actually I was watching Other courses and at one point I was stuck and cant get the way people explaining LOOP. Finally, this was the One were I had to stop searching for Other Teachers. Thanks a lot Sir, Appreciate you. Timing of video 4:11 were I was like😲
@priyankapungaonkar5363
@priyankapungaonkar5363 5 лет назад
for i in range(4): for j in range(4-i): print(i+j+1, end="") print()
@yashjain2370
@yashjain2370 4 года назад
for i in range(1,5): for j in range(0,5-i): print(i+j, end="") print() This is much Better
@Sadfrictionshorts
@Sadfrictionshorts 4 года назад
can,t understand the thing :(
@henster_gaming
@henster_gaming 4 года назад
@@Sadfrictionshorts i =1 a = ("# " *4) while i
@neokrsnik
@neokrsnik 5 лет назад
love the python series... must compliment you on creating such consistently amazing content... just a small observation, for the last example, would reversing the outside loop have created a more intuitive code?
@AdeshPaul
@AdeshPaul 3 года назад
hello sir! I really like your video tutorials which helps me in getting an entry level job as a software trainee. Thanks a lot.
@sachink1224
@sachink1224 2 года назад
I can't comment anywhere, but when i see these video, i told from bottom of heart your teaching procees to great for new student, all basics you have covered, thank you!!
@sonaliumare344
@sonaliumare344 5 лет назад
for i in range(4): for j in range (4-i): print(i+j+1,end="") print() thanks for such a wonderful course for free sir
@DarkKnight-dc9gr
@DarkKnight-dc9gr 4 года назад
1) for i in range(1,6): for j in range(i,5): print(j,end="") print() 2) s1="ABCD" s2="PQR" l=len(s1) for i in range(0,4): for j in range(i+1): print(s1[j],end="") for k in range(i,3): print(s2[k],end="") print()
@sourabhvyas7097
@sourabhvyas7097 2 года назад
(1,5) *
@balrampatel1014
@balrampatel1014 Год назад
@@sourabhvyas7097 at least try first
@learnersbuzz7920
@learnersbuzz7920 4 года назад
Heartful thanks to you sir for giving us a great knowledge about python in a easy manner, we want more classes on patterns sir
@narendra576
@narendra576 11 месяцев назад
The way you are teaching is exceptional and because of teaching in different style we are able to understand the topics easily. i am greatful to find your courses on youtub. there so many related topics but problem solving and logic building idea provided by you is totally exceptional. Thank you Navin sir.👌👌
@hshhsh7172
@hshhsh7172 3 года назад
Answer for 1st qst: for j in range(0,5): for i in range(j+1, 5): print(i, end="") print()
@sarthakagrawal7443
@sarthakagrawal7443 3 года назад
1). for i in range(4): for j in range(i+1,5): print(j, end="") print() 2). s1="ABCD" s2="PQR" for i in range(4): print(s1[0:i+1]+s2[i:])
@Benny1704
@Benny1704 Год назад
thanks dude , its nice logic . how did u come up with this idea
@subhashis3675
@subhashis3675 Год назад
s1[(0:i+1)]+s2[i:] ye thoda samjha do pls
@topgameplay4897
@topgameplay4897 3 года назад
I love your way of explaining,as you first do it wrong,then tell us the write method. Thank You 😀😀
@abhaykanwasi881
@abhaykanwasi881 Год назад
A Huge thank you sir.... You are the only reason I able to understand loops completely
@NarenderKumar-tp3bg
@NarenderKumar-tp3bg 4 года назад
Third pattern can also be drawn in thus way also: For i in range(4,0,-1): For j in range(i): print('*',end=" ") print()
@Agamdeep_Singh
@Agamdeep_Singh 2 года назад
for i in range(4): print("# " * 4)
@akshaysbhende5063
@akshaysbhende5063 Год назад
i did the same
@ashok.marthineni
@ashok.marthineni 5 лет назад
1. for i in range(5): for j in range(i+1,5): print(j,end="") print()
@dineshdinesh-kn1uk
@dineshdinesh-kn1uk 3 года назад
It's wrong
@madhankumarmr9968
@madhankumarmr9968 3 года назад
Correct bro
@dineshdinesh-kn1uk
@dineshdinesh-kn1uk 3 года назад
But i didnt get answer
@ashok.marthineni
@ashok.marthineni 3 года назад
@@dineshdinesh-kn1uk jst an indentation error Give four spaces for second for loop that's it
@dineshdinesh-kn1uk
@dineshdinesh-kn1uk 3 года назад
Ok
@sherwinlouie2191
@sherwinlouie2191 3 года назад
Thank you! Was driving me crazy finding a solution but your explanation is so good!
@dsingh16
@dsingh16 3 года назад
Got better clarity about for loop here ! just searching the best learning path in Udemy but found this here in a better way. Mr. Neveen Sir, Thanks a lot .
@mysteri0us_998
@mysteri0us_998 3 года назад
the answer to the third one can be simplified as: for i in range(4): print("#"*(4-i)) easy
@greenleaf6628
@greenleaf6628 3 года назад
in the exam they'll ask fr nested loop
@parthmodi5372
@parthmodi5372 5 лет назад
1)for i in range(4): for j in range(4-i): print(j+1+i," ",end="") print() 2)str1='ABCD' str2='PQR' for i in range(4): print(str1[ : i+1 ] + str2[ i : ])
@chundurupriyanka3980
@chundurupriyanka3980 4 года назад
Can u explain the logic of 2nd problem
@vinamrajha1571
@vinamrajha1571 4 года назад
@@chundurupriyanka3980 string slicing
@divyanshusingh6105
@divyanshusingh6105 4 года назад
Hats off bro...🙌
@divyanshusingh6105
@divyanshusingh6105 4 года назад
@PARTH MODI Really Great
@satya3356
@satya3356 3 года назад
Hi Parth, I also used same kinda logic bt m getting space between abcd n pqr string like below: A PQR AB QR ABC R ABCD
@syedbanu8576
@syedbanu8576 2 года назад
Naveen ji,big salute for your dedication.Best way of learning code is from your channel
@friendlycreeper1045
@friendlycreeper1045 3 года назад
Sir you are the best. All courses are nothing before your videos. Salute you sir. Because of you now I'm the best python programmer in my class.
@safwatchoudhury7257
@safwatchoudhury7257 5 лет назад
solution1st: for i in range(4): for j in range(i,4): print (j+1,end="") print() solution 2nd: chr='ABCDPQR' for i in range(4): print(chr[0:i+1],end="") print(chr[4+i:7]
@vishnupriyam2926
@vishnupriyam2926 4 года назад
In ur second solution exactly at 4th line why is that indexing is 7 ?
@safwatchoudhury7257
@safwatchoudhury7257 4 года назад
@@vishnupriyam2926 because there are 7 characters 'ABCDPQR' for position 0 to 6 . so when you give the end point at 7 it actually access the sixth character as the final character.
@shrutiagrawal8015
@shrutiagrawal8015 3 года назад
# for assignment quest1 for i in range(1,6,1): for j in range(1,6-i,1): print(j,end="") print()
@madhukiranreddy9080
@madhukiranreddy9080 Год назад
ans for ass 1: for i in range(0,5,1): for j in range(1+i,5,1): print(j,end="") print()
@samuelkanvalli2541
@samuelkanvalli2541 Год назад
Woow!! Really amazing video, I have been searching alot everywhere of this pattern concept; after watching this video now, I can build my own patterns . Thank you so much sir.
@chessbd
@chessbd Год назад
Thanks for the very step-by-step explanation.
@raone119
@raone119 3 года назад
Sir, Print triangle patterns it can also write 👇 For j in range (1,5): For i in range (i): Print ("#",end="") Print()
@Agamdeep_Singh
@Agamdeep_Singh 2 года назад
for i in range(4): print("# " * 4)
@balloffire39
@balloffire39 Год назад
By the way you are explaining very well. As I have gone through many classes but I am done here. TYSM for this kind of contents.
@abdulrauf2476
@abdulrauf2476 4 года назад
This course is really awesome I like it very much Thank u so much sir for making this course
@manavreja7083
@manavreja7083 4 года назад
solution for the first ques for i in range (1,5): for j in range(5-i): print(i+j ,end= "") print()
@shivanshusingh4877
@shivanshusingh4877 4 года назад
print(j+1) should be used instead
@skjnas
@skjnas 4 года назад
2)Prob str1 = ('APQR') str2 = ('ABCD') for i in range(1): print(str1,end="") print() i=str1.replace("P", "B") print(i,end="") print() j=i.replace("Q","C") print(j,end="") print() print(str2)
@alhasantoru
@alhasantoru 4 года назад
Thanks
@bhagatg1917
@bhagatg1917 3 года назад
Correct..but 1 mistake..at 9th line str1 = I would come
@eacaf84
@eacaf84 2 года назад
Mr. Navin, Thank you for this beautiful course. I would like to see some small python projects that you can design and implement here on youtube so that we can see some real life applications of this amazing programming software that is called Python!
@soumikdutta77
@soumikdutta77 2 года назад
To my knowledge so far in my career in IT industry this is the first ever time I have understood the concept of inner loop and how it gets displayed by the outer loop has been an eye opener . Thank you Mr Naveen Reddy for your overwhelming contribution and support to the world in the field of technology.
@sj24560
@sj24560 Год назад
bro what job you are doing now?
@prasadjpai
@prasadjpai 4 года назад
For Question 2: This will be a generic solution where str1 and str2 can be replaced by any characters irrespective of the length of the strings. str1="ABCD" str2="PQR" i=0 while i < len(str1) : for j in range(0,i+1): print(str1[j],end=" ") for k in range(i,len(str2)): print(str2[k],end=" ") i+=1 print()
@ranjankumarsahu998
@ranjankumarsahu998 3 года назад
x = int(input("enter no or rows")) for i in range(x): for j in range(x-i): print(j+i+1, end=" ") print() came late, but had fun. Also I noticed for the same code in 5:45, My pattern is flipped upside down(which you reversed btw(which when i tried got you first pattern)). Do you think this is because of the updated pycharm versions.
@hiraparaom9545
@hiraparaom9545 10 месяцев назад
I used t=-1 for i in range(4): t=t+1 s=t for j in range(4-i): S=S+1 print(s, end="") Print()
@skrezwan12
@skrezwan12 3 года назад
omg!! I am amazed what a great teacher on internet
@pratikrout1400
@pratikrout1400 3 года назад
the best video on pattern printing i have ever seen
@niharkhandekar8910
@niharkhandekar8910 5 лет назад
solution for 1st problem for i in range(1,5): for j in range(i,5): print(j,end="") print()
@caniget600subscriberswitho5
@caniget600subscriberswitho5 3 года назад
Alternative for 1: for i in range(4): print('#' *4) Alternative for 2: for j in range(1,5): print('#'*j) For 3rd: for k in range(4,0,-1): print('#'*k)
@anilrai6918
@anilrai6918 3 года назад
even dull like me is understanding that is how much good your teaching skill is.
@sunymimo1691
@sunymimo1691 Год назад
this was what I wanted someone to suggest me.... I wanted something that makes me capable of thinking new problems ...THANK YOU SO SO MUCH 🖤🖤
@THEBOUNTYPUNE
@THEBOUNTYPUNE 4 года назад
Never seen such comment section flooded with only codes ❤️ Insane !
@sunilmhetre9332
@sunilmhetre9332 4 года назад
# Problem1 solution for i in range(1,5): count=i for j in range(5-i): print(count, end='') count += 1 print('')
@dineshdinesh-kn1uk
@dineshdinesh-kn1uk 3 года назад
No output 🙄
@mik3y790
@mik3y790 3 года назад
thank you my yaar. you helped me complete my assignment for class. SUPER simple and easy to follow!
@khushalthelittleartist
@khushalthelittleartist 3 года назад
i had to watch twice to understand properly how all three patterns work. but as soon as I debugged, the concept was as clear as a mirror!
@CaffeineCoders
@CaffeineCoders 4 года назад
All the three patterns can be done using one loop: 1) for i in range(5): print('#'*5) 2)for i in range(5): print('#'*i) 3) for i in range(6,1,-1): print('#'*i)
@shivammishra310
@shivammishra310 3 года назад
for j in range(1,5): for i in range(j, 5): print(i, end=" ") print() sir my answer is this.
@dheerajyama9915
@dheerajyama9915 3 года назад
wrong answer
@saravanans2539
@saravanans2539 3 года назад
Correct answer
@vinaykumarbellala9984
@vinaykumarbellala9984 3 года назад
tq so much
@sujithm6331
@sujithm6331 2 года назад
Whats the use of print() in the end
Далее
#24 Python Tutorial for Beginners | For Else in Python
5:12
Solve any Star Pattern program in Python
18:44
Просмотров 849 тыс.
ЧТО ЧАПИ ЕСТ НА ЗАВТРАК?
00:23
Просмотров 91 тыс.
World’s Deadliest Obstacle Course!
28:25
Просмотров 73 млн
мы встретились 🔥
00:16
Просмотров 57 тыс.
🤢 To try piggy toothpick beauty gadget
00:30
Просмотров 10 млн
Python 101: Learn the 5 Must-Know Concepts
20:00
Просмотров 1 млн
Solve Any Pattern Question With This Trick!
57:20
Просмотров 2,2 млн
5 Useful F-String Tricks In Python
10:02
Просмотров 262 тыс.
#26 Python Tutorial for Beginners | Array in Python
15:57
If __name__ == "__main__" for Python Developers
8:47
Просмотров 380 тыс.
wireless switch without wires part 6
0:49
Просмотров 4,3 млн