Java tutorial: Practice Questions on Loops

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 1,4 тис.

  • @DroidHolicOfficial
    @DroidHolicOfficial 4 роки тому +109

    Another way of solving the first problem -
    //This for loop is for each line
    for (int i = 0; i < 4; i++) {
    //This for loop is to print some number of stars in one line
    for (int j = i; j for (int i = 0; i < 4; i++) {
    for (int j = 0; j

    • @omkanhe2487
      @omkanhe2487 3 роки тому +6

      Your comment helped me a lot.

    • @ashutoshshukla6340
      @ashutoshshukla6340 3 роки тому +1

      kudos to ur hardwork,it really helped alot

    • @JohnWick_897
      @JohnWick_897 3 роки тому +1

      Hey bro !! Ye har line me me ek star kam kaise ho raha hai.
      Decrease karne ke liye to decrement loop istemal hota hai na to phir increment loop se kaise ho raha hai?

    • @shahzaibbukharii6473
      @shahzaibbukharii6473 3 роки тому

      @@JohnWick_897 jaisy jaisy outer loop kii value increase hw gii....waisy waisy inner loop k stars kam hn gy bcz j=i haii...

    • @JohnWick_897
      @JohnWick_897 3 роки тому

      @@shahzaibbukharii6473 Thanks Bro! Samj me aagaya 👍

  • @joybrar9024
    @joybrar9024 3 роки тому +118

    This is honestly the most fun I've had while studying, I love this course and the questions are amazing :D

    • @neetusaxena7881
      @neetusaxena7881 2 роки тому +2

      go play some games they are more funny

    • @manishgupt1879
      @manishgupt1879 Рік тому +2

      @@neetusaxena7881 harry bhai ne ❤️ diya hai smjh nhi aata 🤔

  • @RohanDasRD
    @RohanDasRD 4 роки тому +228

    These practice Programs are really useful for us

  • @arijeetkumar9832
    @arijeetkumar9832 3 роки тому +26

    Entire Java course is going nice.
    Thanks for providing these helpful courses at free of cost.

  • @sagarbhadre3377
    @sagarbhadre3377 Рік тому +9

    6:17 sum of the even numbers using while loop:
    public class Main
    {
    public static void main (String[]args)
    {
    int sum = 0;
    int n = 4;
    int i = 0;
    while (i < n)
    {
    sum = sum + (2 * i);
    i++;
    }
    System.out.println
    ("the sum of the first 4 even numbers using while loop is below");
    System.out.print (sum);
    }
    }

  • @motivationalquotes8545
    @motivationalquotes8545 3 роки тому +6

    I'm feeling lucky because I don't even thought of learning programming in such a fun way, and practice sets are cherry on the top.

  • @Lila12386
    @Lila12386 4 роки тому +69

    Ads - whitehat jr
    But me -- THE LEGEND HARRY

    • @shravanasati9631
      @shravanasati9631 4 роки тому +6

      yes man whitehat jr is a scam

    • @akshit288
      @akshit288 4 роки тому +2

      Yes whitehatjr wale bhar k fees lete h jo sab mene yt p free m sikha

    • @amanpatwal8518
      @amanpatwal8518 3 роки тому +1

      @@akshit288 chintu ne pgl bnaaya hai

  • @sauravpatil4927
    @sauravpatil4927 Рік тому +3

    This playlist is useful even after 6-7 years, thanks for all your efforts , no words to describe your efforts, you are the hero for the new programmers 🙏🙏🙏🙏🙏😎😎😎

  • @manmohansingh1175
    @manmohansingh1175 4 роки тому +65

    Harry bhai thanks for the amazing practice set. It gave me a lot of understanding about practical usage of for loops .Maza aa gaya problems dekh kar👌✌

  • @shivanklohiya9220
    @shivanklohiya9220 3 роки тому +2

    Question 11 using while loop first n even number sum is :
    int sum = 0;
    int i = 0;
    int n = 5;
    while (i

  • @adityarai30
    @adityarai30 3 роки тому +20

    Bro love your way of explaining the concepts, growing myself by watching CWH videos and learning new languages

    • @neetusaxena7881
      @neetusaxena7881 2 роки тому

      you love his way ? then follow his path and attain salvation

    • @raunaq571
      @raunaq571 Рік тому +1

      @@neetusaxena7881 wel believe in liberation not salvation

    • @arjux4724
      @arjux4724 Рік тому

      bro why are you crying in all comments @@neetusaxena7881

  • @snehalhsambrekar4410
    @snehalhsambrekar4410 2 місяці тому

    Before u solve these problems,,,I solved it confidently,,,because, I learnt c and c++ from your Playlist and now java as well with u ,,,, your amazing teacher..... thanks a ton ..🎉❤..

  • @crescent4033
    @crescent4033 3 роки тому +12

    9:00 by using while loop
    int i = 0;
    int sum = 0;
    int n = 3;
    while (i

    • @rahulpastor5953
      @rahulpastor5953 Рік тому

      Harry bhai ko sikho ki while looop bolke for se kraray

  • @Raj100gour
    @Raj100gour 3 роки тому +16

    Hi Harry,
    First of all Thank you so much for a systematic tutorials.
    and Thanks Ayush, who recommend me to study from your tutorial.
    You know I am a mechanical engineer(passed in 2014) and now I have decided to learn java after waste of my 6 years. and really it is shocking, I have understand all concept because of your tutorial.
    You are really a great teacher.
    I have some basic idea about that but now I have cleared my all doubts.
    Thank you so much!!!

    • @comedy6790
      @comedy6790 3 роки тому +1

      Bekar ka comment read kiya ,merato time vest ho gya

    • @comedy6790
      @comedy6790 3 роки тому

      😭😭😭

    • @kajalbarale7324
      @kajalbarale7324 2 роки тому

      @@comedy6790 jb maine apki comment read ki...tab mera bhi apko same reply karane ka dil kiya .....apna aur time waist karake..................!

  • @Piyush-me9nu
    @Piyush-me9nu 2 роки тому +13

    5:03 here we can also use,
    public class Practise_Q17 {
    public static void main(String[] args) {
    String str= "*";
    for( int i= 4;i

    • @taandavyt8826
      @taandavyt8826 Рік тому +3

      How did you get this logic building in detail bro.. merese to bina dekhe programing solve ho hi ni rhi yrr

    • @mrunknown855
      @mrunknown855 Рік тому

      @@taandavyt8826 yes bro ?any tips?

    • @monotonous_0
      @monotonous_0 11 місяців тому +1

      Sirf i!=0 likhne se hi ho jayega..i

    • @prisha0602
      @prisha0602 3 місяці тому +1

      ​@@taandavyt8826Ah! Same problem

  • @ABDULLAHRAZAJUTT-nu6nv
    @ABDULLAHRAZAJUTT-nu6nv 9 місяців тому +1

    Sir Harry I am learning and enjoy this course. You make this course very easy for us.

  • @vaishnavtej1819
    @vaishnavtej1819 2 роки тому +11

    You are really great sir 🙏 . First time I'm not feeling bored by your lectures. Hope every teacher teaches us in this way !

  • @mohammadtufailahmad9917
    @mohammadtufailahmad9917 Рік тому +2

    Bohot maza aaya Harry bhai practice set me... Question no 1 Star problem ko solve krte waqt to mujhe to sach me taare dikhne lage the😂😂... Phir 1 din baad aaj aapki ye video dekh kr usko banana seekh gya... Thank you so much, brother! May Allah bless you!

  • @zaid6527
    @zaid6527 4 роки тому +162

    Kids: Carry
    Men: Marry
    Legends: Harry 👌

  • @sursangeetujjain2608
    @sursangeetujjain2608 Рік тому +2

    00:20:09 -
    problem - 7 -
    /* Q. 7 - Solve Q.1 Using while loop */
    int n = 4;
    int i = 0;
    while (i

  • @HimanshuKumar-lw2fv
    @HimanshuKumar-lw2fv 3 роки тому +15

    factorial in for loop --
    Scanner sc = new Scanner(System.in);
    int factorial=1;
    System.out.println("Enter any number to get it's factorial");
    int a = sc.nextInt();
    for (int i=1 ; i

  • @janhvinarayan1633
    @janhvinarayan1633 7 місяців тому +1

    thank u so much sir for your time and efforts, I highly appreciate it

  • @renujaiswal9001
    @renujaiswal9001 3 роки тому +12

    Qst:-7 write a program to print a following pattern using while loop---
    Int n=4;
    Int i=n;
    While (i>0){
    Int j=0;
    While(j

    • @ankurddank_afmishra1196
      @ankurddank_afmishra1196 5 місяців тому +1

      wrong

    • @purnendumanas44
      @purnendumanas44 3 місяці тому

      @@ankurddank_afmishra1196 It is correct go check it first by Changing The initials LIke Int-int, While-while, J++ - j++

    • @HalaMadrid-vo7cn
      @HalaMadrid-vo7cn 2 місяці тому

      In the south statement I put /n then it will be done

  • @akshayrajput1597
    @akshayrajput1597 2 роки тому

    Aapne 2nd question while loop se bola or for loop se kia.
    Int i=0;
    Int n=5;
    Int sum=0;
    While(i

  • @prasadsawant7
    @prasadsawant7 3 роки тому +11

    13:21 and 24:54
    Maja aa raha hai Practice Set solve karne me bhi aur Videos dekhne me bhi, seriously you are providing us great quality course, which I don't think so many colleges provide ❤☺.

  • @pranavrajgoje3020
    @pranavrajgoje3020 3 роки тому +1

    Question 2 using while loop
    public static void main(String[] args) {
    System.out.println("Code to find the sum of first n even numbers");
    Scanner sc=new Scanner(System.in);
    System.out.println("Enter the value of n");
    int n = sc.nextInt();
    int i = 1;
    while(i

  • @ambivertarchit4421
    @ambivertarchit4421 3 роки тому +10

    9:00 Using While Loop
    public static void main(String[] args) {
    int sum = 0;
    int n = 3;
    int i = 0;
    while(i

    • @ittechnology8773
      @ittechnology8773 2 роки тому

      Hi bro mara ku first question ku solve nahi kor para hu help koro ga...

    • @TripBuddy217
      @TripBuddy217 2 роки тому

      @@ittechnology8773
      public class Pattern {
      public static void main(String[] args) {
      int i, j;
      for (i = 1; i

    • @Vlogging_guy19
      @Vlogging_guy19 2 роки тому

      It's wrong

  • @Moto_Gt94
    @Moto_Gt94 2 роки тому

    Practice set se bahut madad milti hai bhaiya aur khud se solve krne ke baad aur maza aata hai ☺☺☺

  • @kapilrana4043
    @kapilrana4043 3 роки тому +3

    harry bhai question may while loop use karne bola tha
    8:34
    int n =10;
    int i=0 , sum=0;
    while(i

  • @siddhirainak8751
    @siddhirainak8751 Рік тому +2

    I know ki mai bhot late Dekh rahi hu ye cource but seriously I can see your efforts in it man sab kuch bhot useful hai aur ye practice set wala idea tho by God best hai hum new new thinks sikhate hai is waja se I am just loving it ❤
    Thank for this harry bhai 🙏😇

  • @Altamas285
    @Altamas285 Рік тому +28

    For those who are learning Java,some good questions:
    [WAP means Write a program]
    1.)WAP to print the reverse of a number
    2.)WAP to print the factorial of first 5 natural numbers
    3.)WAP to check whether a number is prime or not.If it is prime,print it's factorial else print it's multiplication table
    4.)WAP to print the factorial of prime numbers from 1 to 10.
    5.)WAP to check whether a number is special number or not.
    6.)WAP to check whether a number is palindrome number or not.
    7.)WAP to check whether a number is armstrong number or not.
    8.)WAP to print the reverse of first 3 special numbers
    [U may Google the definition of palindrome,armstrong and special number.]
    Edit:If u found it useful for beginners,do like the comment so that everyone can go through these questions.

    • @prapti2385
      @prapti2385 Рік тому +2

      For solutions refer this :
      1) import java.util.*;
      public class reverse {
      public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      System.out.println("Enter a number");
      int n=sc.nextInt();
      int rev=0;
      while(n>0)
      {
      int d=n%10;
      rev=(rev*10)+d;
      n/=10;
      }
      System.out.println("The reverse of the number is "+rev);
      }
      }
      2)public class factorialoffirst5numbers {
      public static void main(String[] args) {
      int fact=1;
      for(int i=1;i=1;j--)
      {
      fact=fact*j;
      }
      System.out.println("The factotial of "+i+" is "+fact);
      fact=1;
      }
      }

      }
      3) import java.util.*;
      public class primeornot {
      public static void main(String[] args) {
      Scanner sc=new Scanner(System.in);
      System.out.println("Enter a number");
      int n=sc.nextInt();
      int c=0;
      for(int i=1;i

    • @blessenjoel6105
      @blessenjoel6105 9 місяців тому +1

      @Altamas285 my brain literally travelled all universes while solving your questions 😂 as a beginner ? but tqsm it helped me in my thinking and logic building

    • @dakshmalik21
      @dakshmalik21 9 місяців тому +1

      Same here😂😂😂

    • @dakshmalik21
      @dakshmalik21 9 місяців тому

      Bro, how to solve the 8th question

  • @amankush07
    @amankush07 5 годин тому

    Sir bhut mja aata h solve krne me.... Thank you so much sir 😊

  • @infomayet7555
    @infomayet7555 2 роки тому +4

    Amazing Course and Truly Challenging and great questions. A wonderful learning experience

  • @studyafa7159
    @studyafa7159 3 роки тому

    bhai aj ek chiz notice kari , ap itna badhia content de rahe hai vo bhi free
    salute hai bhai aapke hard work ko
    thank you very much bhai

  • @kp9773
    @kp9773 3 роки тому +14

    9:10 The question was to print the sum of even numbers using while loop but Harry sir used for loop, did I miss a point, or did sir went somewhere wrong? 😅😅 By the way, thank you for the questions 😊

    • @kp9773
      @kp9773 3 роки тому +2

      He later noticed his mistake so please ignore this comment😅😅😅

    • @pocof3gt309
      @pocof3gt309 2 роки тому

      Arshad warsi be like :
      Kahan se aate hai yeh log😂

    • @ChatGPT......
      @ChatGPT...... 11 місяців тому

      Bhai abhi kya kar rhe ho? 🙂🙂Thoda gyan dedo bhiya😊😊

  • @Jainil-yq6fc
    @Jainil-yq6fc Рік тому +1

    another way to solve first problem:-
    public static void main(String[] args){
    int n=10;
    for (int i=0;i

  • @chaoticyatan7115
    @chaoticyatan7115 Рік тому +5

    20:30 But we can't use for or while loop for printing something at least once (even if it doesn't satisfy the condition) unlike do-while loop.

    • @DK-js8cz
      @DK-js8cz Рік тому +2

      exactly same doubt bhai. Harry mentioned 3 types of loops can do same work in the question, but in which do while loop is executes at least once even if condition fails, whereas for and while loop do not work like that. In my opinion answer is false, but in the video harry talked about only for and while loops only, in that case he is right.

  • @pulkit8133
    @pulkit8133 2 місяці тому +1

    //Problem 2
    int n=2;
    int sum=0;
    int i=0;
    while(i

  • @hiaishaxagpal2132
    @hiaishaxagpal2132 2 роки тому +4

    Harry bhai thank you so much for all your hard work. I might not being knowing how much hard work it takes for you to make these videos.
    @2:37 practice questions 1 and 2 were something I was not able to follow along. For question number 2 to be very honest with you nested for loop statement was used and I felt very hard to follow along. It would be great if you can suggest me any of your previous videos as a prerequisite to understand the nested loop statement. I am following your video series from the beginning please help me out.
    Thanks

    • @Oak-dk4hl
      @Oak-dk4hl 2 роки тому

      idk why but same for me..other questions were easy to understand

  • @ummeruman6226
    @ummeruman6226 8 місяців тому

    Having a great time learning and solving all the problems

  • @likhithgowda2653
    @likhithgowda2653 4 роки тому +5

    Maza a gaya bhia.. but I dint understood the first problem of stars🙄... Thank you love from Bangalore 💓

  • @princenagar1686
    @princenagar1686 Рік тому +1

    Practice set is very useful, even now in 2023 all this is so relevant and actually paid in other Institutions.

  • @dhruvikmalaviya9451
    @dhruvikmalaviya9451 4 роки тому +9

    thank you so much sir for these types of amazing practice set :)

  • @biswajitpaul5029
    @biswajitpaul5029 Рік тому

    problem number 2 using while loop
    : int sum = 0;
    int n=4;
    int i=0;
    while(i

  • @omkargadekar52
    @omkargadekar52 3 роки тому +4

    This practice set is really awesome , no need to Google for this practice for this concept , KEEP IT UPP !❤️

  • @gauravyeskar1809
    @gauravyeskar1809 3 роки тому

    Bhot accha lagta hai sir jb ap sikhate ho tb.... Hands off to you sir

  • @aakritithakur359
    @aakritithakur359 4 роки тому +4

    Amazing explanation. Thanks for bringing this course. Helping a lot.

  • @techamatuer8115
    @techamatuer8115 Рік тому +1

    i am very impressed harry bro to your work

  • @anantakumarsahu2658
    @anantakumarsahu2658 4 роки тому +4

    Harry bhai hacktoberfest ke baare me video banao na ..

  • @shaileshpoojary8842
    @shaileshpoojary8842 2 роки тому

    Problem number 9
    int n=8;
    int sum=0;
    int mul=0;
    for(int i=1;i

  • @hariomprem1824
    @hariomprem1824 3 роки тому +4

    Thank you so much man!!
    Proud on you.
    Your dedication level = no match

  • @aonkhan7313
    @aonkhan7313 4 роки тому +4

    your videos are so damn amazing ... I'll become software engineer just by watching your videos 😅 that's how good your videos are ❤️

  • @anujraj0
    @anujraj0 3 роки тому +1

    doing this java course continuously harry bro
    good practice work

  • @46_yashakarsh28
    @46_yashakarsh28 4 роки тому +69

    Legend of roasting - carry
    Legend of coding - harry

  • @blinx_edits
    @blinx_edits 2 роки тому +1

    TYSM bhaiya!!! best course ever !!!!

  • @anushkaverma6382
    @anushkaverma6382 3 роки тому +5

    Ans 1:
    String s = "****";
    int a = s.length();
    while (a>0){
    System.out.println(s.substring(0,a));
    a--;
    }

  • @02govindjadhav.47
    @02govindjadhav.47 Рік тому +1

    9:10 while loop use karna tha, aapne for loop use kiya hai.
    import java.util.Scanner;
    class Sum_of_n_even_numbers
    {
    public static void main(String[] args)
    {
    int x, i = 0 ;
    int sum = 0;
    System.out.println("Enter Number of items :");
    Scanner s = new Scanner(System.in);
    x = s.nextInt();
    while(i < x)
    {
    sum = sum +(2*i);
    i++;
    }
    System.out.println("Sum of "+x+" numbers is :"+sum);
    }
    }
    This is how you do it with while loop.

  • @codemc7376
    @codemc7376 2 роки тому +4

    15:16,
    Q - 5
    // first and best way
    Scanner input = new Scanner(System.in);
    System.out.println("enter a num :");
    int n = input.nextInt();
    int res = 1;
    for (int i = 1; i

    • @vishaldeshmukh926
      @vishaldeshmukh926 Рік тому

      Hello Sir, please could you tell me what is the cenario of System.out.printf();
      Why we use and how we use...?
      What is the benefits..?

    • @minecrafter64899
      @minecrafter64899 Рік тому

      @@vishaldeshmukh926 go back a few videos. i suggest not skipping the playlist. keep eyes and ears open when watching.

  • @MrNucleus
    @MrNucleus Місяць тому

    6:14 public class Main {
    public static void main (String[] args) {
    int sum = 0 ;
    int n = 6 ;
    int i = 1 ;
    while(i

  • @sujatajena267
    @sujatajena267 4 роки тому +11

    15:24
    // Yeh raha code
    import java.util.Scanner;
    System.out.println("Enter the number whose factorial you want:");
    Scanner sc = new Scanner(System.in);
    int fac = 1;
    int n = sc.nextInt();
    for (int i = n;i>=1;i--){
    fac = (fac*i);
    }
    System.out.printf("Factorial of %d = %d",n,fac);

  • @lifeandliving2928
    @lifeandliving2928 Рік тому

    mja aa rha h bhaiya bahout khud se solve kiya aur solve hua bhout khusi hui harry bhaiya

  • @akhilvibhakar9636
    @akhilvibhakar9636 3 роки тому +4

    13:22
    humen maza aa raha hai questions solve krne mein

  • @SaurabhYadav-hh9ex
    @SaurabhYadav-hh9ex Рік тому

    Bahut mazaa aa rha hai Sir ji..... Aapka explain krne ka method bahut achcha h

  • @anshdholakia714
    @anshdholakia714 4 роки тому +22

    ---- Answers ---
    Question 7: 1 in while loop:
    int i=4;
    while(i>=0){
    int j=i;
    while(j>0){
    System.out.print("* ");
    j--;
    }
    System.out.println();
    i--;
    }
    question 10: question 2 in while loop:
    Scanner scan=new Scanner(System.in);
    System.out.println("Enter the maximum limit of numbers: ");
    int n=scan.nextInt();
    int i=0;
    while(i

    • @thesarthakshrestha
      @thesarthakshrestha 3 роки тому +3

      dono ko explain kar sakte ho ansh bhai plzz

    • @anshdholakia714
      @anshdholakia714 3 роки тому +12

      yes definitely explain karunga!@@thesarthakshrestha
      For the 7th question as you can see that in the 1st question humne for loop use kiya hai aur usme don variable dale hai 'i' and 'j'. humne do variable dale hai kyonki humko vertically and horizontally jaana hai triangle banane ke liye. And the triangle is in the downwards direction so we will have to start 'j' equal to 'i'. as when 'i' will be 4, 'j' will be equal to 4 in the first loop and will print a 4 * line in the first line. Then using 'i--', Maine 'i' ko reduce kiya hai, kyon? kyonki phir 'j' 4-1 that is 3 times * print karega as 'j' is equal to 'i'. And similarly I have put the main loop to run till 'i' becomes 0.
      And For the 10th question, pehle toh maine user seh input liya hai for the maximum limit. phir maine i and sum ko declare kiya hai to 0. becuase if we multiply something to 0 we will get 0 and we want 0 as it is an even number as well. Then maine ek while loop run kiya hai that stops when i is more than the limit entered by the user. Aur us while loop mein, maine sum mein add karte gaya (i*2) kyon? kyonki any number multiplied by 2 becomes even for example 1 hoga 2, 2 hoga 4..... aur aise humko saare even numbers miljainge till that limit. And like that we will get the sum in 'sum'.
      Hope you understood :)

    • @mirzayounus676
      @mirzayounus676 2 роки тому +1

      7ans wrong hai

    • @shakti_055
      @shakti_055 Рік тому

      @@mirzayounus676 j++ hoga ❓

    • @sankalp.sankalp
      @sankalp.sankalp Рік тому

      @@mirzayounus676 kaise wrong hai bro??

  • @MotivationalMindsNetwork
    @MotivationalMindsNetwork 5 місяців тому

    We are enjoying this course a lot. Thank you so much

  • @Crickzone2040
    @Crickzone2040 2 роки тому +4

    Instead of using format specifier in 3rd question we can do like this :
    package com;
    public class loop {
    public static void main(String[] args) {
    int n=6;
    for(int i=1;i

  • @eaglehunter6487
    @eaglehunter6487 3 роки тому

    //Question 11
    //Repeat Question 2 using for loop
    //Scanner sc=new Scanner(System.in);
    //int n;
    //System.out.println("Enter a number");
    //n=sc.nextInt();
    //int sum=0;
    //for(int i=0;i

  • @RANDOM_THINGSRT
    @RANDOM_THINGSRT Рік тому +6

    Que no2 to using while loop se kaise aayega?
    Aapne for loop se solve kiya hai...

  • @codemc7376
    @codemc7376 2 роки тому

    practice set Q-2
    answer :
    int n = 5;
    int i = 0;
    int sum_ = 0;
    while (i < n){
    sum_+=i*2;
    i++;
    }
    System.out.printf("sum of top 5 even number is %d",sum_);

  • @suvanjanprasai544
    @suvanjanprasai544 4 роки тому +7

    I have a question regarding python. Can I open any file, folder, apps without adding a path?

    • @techysparks2890
      @techysparks2890 4 роки тому +1

      If the file is not in your current working directory, then you have to specify the full path otherwise no need.

    • @suvanjanprasai544
      @suvanjanprasai544 4 роки тому +1

      @@techysparks2890 but I want my python to search for it, not give the path

    • @vaibhav3852
      @vaibhav3852 4 роки тому

      @@techysparks2890 environment variable is another thing

    • @KodiLearn
      @KodiLearn 4 роки тому +1

      @@suvanjanprasai544 you can use rglob to search files

    • @techysparks2890
      @techysparks2890 4 роки тому

      Suvanjan Prasai If you will not specify the path,python will search the file in your current working directory and if the file is not found the python will throw you an error.

  • @agastyavirfood9152
    @agastyavirfood9152 2 місяці тому

    your saying of See you next time.. the modulation of voice and appeal in it is really cool!

  • @subhu143
    @subhu143 3 роки тому +11

    \\Question 5 using for loop
    Int Factorial=1;
    Scanner sc=new Scanner (System.in) ;
    System. Out. Print ("enter a number for factorial")
    Int n=sc.nextInt() ;
    for (int i=n;i>0;i--) {
    Factorial*=i;
    }
    System. Out. Print(Factorial) ;

    • @manavdeepsingh400
      @manavdeepsingh400 2 роки тому

      bhai nahi challa

    • @manavdeepsingh400
      @manavdeepsingh400 2 роки тому

      par yeh challa
      meine banaya

    • @saurabhsingh-fn4ru
      @saurabhsingh-fn4ru 2 роки тому

      Int factorial =1 hoga kya??

    • @subhu143
      @subhu143 2 роки тому

      @@saurabhsingh-fn4ru hmm bhai. 1 hoga galti de limja diya hai agar 0 hoga jitne bar multiply karenge 0 hi rahega

  • @akashchaudhary4972
    @akashchaudhary4972 2 роки тому

    Bhai loop me sach me maja aa gaya. Kya samjaya hai👌👌👌👌

  • @abhiaryan07
    @abhiaryan07 4 роки тому +6

    20:36 No it's false..... Do while has minimum execution of 1 which is not the case with the other 2 loops
    ...

  • @harshrajbhar2820
    @harshrajbhar2820 3 роки тому +1

    Harry bhai akhir kar answer aa hi gaya

  • @lookbehindyou4981
    @lookbehindyou4981 Рік тому +57

    Mujhe ye 1 samajh kyon nhi aa rha?

    • @NoName-is9qv
      @NoName-is9qv 11 місяців тому +1

      Kyaa nahi samaj araha

    • @Technonews1999
      @Technonews1999 9 місяців тому +2

      Refer others videos for * pattern program.. Harry's video on pattern program are too difficult .. he will not explain the core logic

    • @mansirawat3578
      @mansirawat3578 9 місяців тому +1

      Us bro us

    • @j-techcreationstudio7389
      @j-techcreationstudio7389 9 місяців тому +2

      Bro Harry ne nested loop ka use kiya hai , first loop jo hai woh row ki tarah kam karega aur uske andar wala second loop column ki tarah kaam karega . Agar aapko details me Jaan na hai toh apna college me shradha ma'am ne iss topic pe detail video daala hai

    • @AmanChauhan-eb9mh
      @AmanChauhan-eb9mh 9 місяців тому

      Bhai lpu se ho kya​@@j-techcreationstudio7389

  • @mohsinkamal5472
    @mohsinkamal5472 3 роки тому

    Hi SIr Code With Harry I am from pakistan. Trust me I watched your all videos from starting of java course.I will complete in another 10 days.Thanks for Guide us Correctly

  • @khusi2145
    @khusi2145 2 роки тому +9

    Java practice set 5's all answers .(excluding 6 and 11)
    NOTE- Friends if you want to run the codes( given below ),then kindly run those separately for an error free experience.
    code-
    // q1
    for(int b=4;b>0;b--){
    for(int c=1;c

    • @badalsahoo3902
      @badalsahoo3902 2 роки тому

      Thanks bro I cant solve the 7 no question , I am trying to solve this only while loop means one while loop under another while loop like for loop under for loop, so I see your answer and see you using for loop under while loop and I try it ,and it works ,Thanks❤

    • @subhajitkhasnobish2370
      @subhajitkhasnobish2370 2 роки тому

      can Q7 be solved using only while loops?

    • @omkark7118
      @omkark7118 Рік тому +1

      @@subhajitkhasnobish2370 int i = 4;
      while(i>0){
      int j = 0;
      while(j

    • @omkark7118
      @omkark7118 Рік тому

      @@badalsahoo3902 int i = 4;
      while(i>0){
      int j = 0;
      while(j

    • @vishnujyothik5983
      @vishnujyothik5983 Рік тому

      Thanks brother helped a lot for question number 2

  • @royfamily9273
    @royfamily9273 2 роки тому

    Bohot maja aa raha ha Harry Bhaiya in problem ko solve karne me.

  • @ranaharoonhacker
    @ranaharoonhacker 4 роки тому +7

    I tried Practice #1 seeing from questions before video. mine looked more simple.
    String str = "*";
    for(int i=4; i>0; i--){
    System.out.println(str.repeat(i));
    }

  • @karannegi2709
    @karannegi2709 3 роки тому

    Sir aap best ho...... Or practice question ki bahut jarurt thi..... Kyu sir definition to sab btate h... Par jab thak problem solve nhi ki tab tak samjh me nhi aata h.....

  • @reveal5081
    @reveal5081 Рік тому +9

    Hara Hara mahadeva

    • @delete7950
      @delete7950 11 місяців тому +4

      Har Har Mahadev

  • @abhishekpandit6287
    @abhishekpandit6287 3 роки тому

    bhai aap bhot mhnt krto ho hmare lia thankyou so much harry bhai.....

  • @ManasKrMajumdar
    @ManasKrMajumdar 4 роки тому +7

    bhaiya ji free tshirt wale video delete kyu kar de
    le harry bhaiya:) pure to mere subscriber log he lekar chale gye mujhe nhi mila😂

    • @abhi36292
      @abhi36292 4 роки тому

      private kr di

    • @technosujeet
      @technosujeet 4 роки тому

      Bhai vo video ka jo intension tha vo satisfy nhi hua aur aage chal ke us video ne spam ka roop le liya jo ki achha nhi tha isiliye video private kar di bhai ne

    • @ManasKrMajumdar
      @ManasKrMajumdar 4 роки тому

      @@technosujeet why?

    • @ManasKrMajumdar
      @ManasKrMajumdar 4 роки тому

      spam kaise ho gye?

  • @sapthasagar7840
    @sapthasagar7840 2 роки тому +1

    ithana enjoy kar raha hoon is quesetions solve karke, ab yaha thyohaar chala raha hai phir bhi mai iss problems kosolve karke dekh raha hooon,kuch karne ka satisfaction aa raha hai mujhe

  • @rx_rx_rx633
    @rx_rx_rx633 3 роки тому +3

    6:01q
    questions was print sum of n even number by using while loop but you used for loop !!!!!!!!!!!!!!!!!!!!!!

  • @CaptainJackSparrow123
    @CaptainJackSparrow123 4 роки тому +5

    Give me a heart

  • @mukul3615
    @mukul3615 3 роки тому

    Que-11
    Scanner sc =new Scanner (System. in) ;
    int n =sc. NextInt();
    System. out. Println("sum of even number is : ")
    int i =0;
    int sum;=0;
    While(i

  • @zuhaibulhassan.
    @zuhaibulhassan. 2 роки тому +1

    Really enjoy and solve these practice problems thank You Harry sir.

  • @saniaeqbal3797
    @saniaeqbal3797 3 роки тому +1

    Enjoying solving the programs ........... really helpful for us cause it is really hard to learn loop online but by seeing this video it clears all our concept

  • @sumitsaha6533
    @sumitsaha6533 2 роки тому

    Bohot maza aa rha hai isse solve karne me 😊

  • @atifsamim7080
    @atifsamim7080 Рік тому

    Entire Java course is going nice.

  • @Pooja-fy1bn
    @Pooja-fy1bn 2 роки тому +1

    sir aap bohat hi ache padate ho 😍😊

  • @jay_creation3176
    @jay_creation3176 2 роки тому

    suru majburi me kiye the but ab maja aa raha he..... :)

  • @chaoticyatan7115
    @chaoticyatan7115 Рік тому

    I am enjoying solving these problems thanks Harry Bhai

  • @aakashit2434
    @aakashit2434 Рік тому

    you are great sir you are better than my university professor

  • @utsavgoyal2478
    @utsavgoyal2478 2 роки тому

    These practices problem are really useful for us

  • @adxgaming7527
    @adxgaming7527 3 роки тому +1

    bahut mazzaa aa raha hai harry bhai

  • @MuhammadUsman-bm7qb
    @MuhammadUsman-bm7qb 3 роки тому

    sir bht maza aa rha hai. problem solving main

  • @akashsarkar6790
    @akashsarkar6790 Рік тому

    int n = 5;
    int sum= 0;
    int i = 0;
    while (i