There is one example in python basics for nested l...

Discussion in 'Web App and Programming' started by _18831, Dec 27, 2017.

  1. _18831

    _18831 Member

    Joined:
    Dec 22, 2017
    Messages:
    3
    Likes Received:
    0
    There is one example in python basics for nested loop
    i=2
    while(i<100):
    j=2
    while(j<=(i/j)):
    if not(i%j): break
    j=j+1
    if(j>i/j): print i, "is prime"
    i=i+1
    What is the output for this? i'm unable to see!
     
    #1
  2. Priyanka_Mehta

    Priyanka_Mehta Well-Known Member
    Simplilearn Support

    Joined:
    May 25, 2017
    Messages:
    726
    Likes Received:
    50
    Hi Raj,

    Kindly find the output attached below:
    upload_2017-12-30_15-44-9.png

    I hope this will help you.
     
    #2

Share This Page