Jump to content

Recommended Posts

Posted

Hello ime new stin python kai tora ematha ta if/while/break klp apla kolisa stin entoli continue.

 

Edw ine ena paradeigma:

 

while True:
    s = raw_input('Εισάγετε κάτι : ')
    if s == 'quit':
        break
    if len(s) < 3:
        print('Πολύ μικρό')
        continue
    print('Το μήκος των εισαχθέντων είναι επαρκές')

 

Ok to treksa auto to programma, ma den mporw na to xonepsw ti akrivos kanei.An ine < 3 tote lei poli mikro, enw an >3 tote to mikos ine eparkes. Ala pos ginete auto? Mporei kapios na mou pei akrivos akrivos pos doulevei to continue genika kai pws sto sigkekrimeno paradigma?

Posted

 

 

while True:
    s = raw_input('Εισάγετε κάτι : ')
    if s == 'quit':
        break
    if len(s) < 3:
        print('Πολύ μικρό')
        continue
    print('Το μήκος των εισαχθέντων είναι μικρό')
     else
     if len(s) > 3:
       print('Επαρκες')
          continue
print('Το μήκος των εισαχθέντων είναι επαρκές')

 

?

Posted

Sinexizh tin epomenh entolh tou broxou.

 

An exeis apories yparxoun apira... tutorial. Gia ta statements pou zhtas na mathis kai pws litourgoun sta python.

 

To else den xrisimopoite otan o broxos exei break.

 

else:

      print('is a prime number')

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...