new in python !!!!

Γιάννης Κατσαμπίρη Γιάννης Κατσαμπίρη
Wed Jun 24 13:17:41 BST 2009


>>  για σας παιδια !!!
>> αποφασια να αρχισω python3 και ειχα το εξης προβληματακι
>>
>> #!/usr/bin/python
>>
>> # Filename: break.py
>>  
>> while True:
>>     s = (input('Enter something : '))
>>
>>     if s == 'quit':
>>         break
>>     print('Length of the string is', len(s))
>>
>> print('Done')
>> να και το μαθημα
>> http://www.swaroopch.com/notes/Python_el:%CE%88%CE%BB%CE%B5%CE%B3%CF%87%CE%BF%CF%82_%CF%81%CE%BF%CE%AE%CF%82
>>
>> και το ερορ
>>
>>
>> kour at kour-laptop:~$ python '/home/kour/Επιφάνεια εργασίας/kour.py' kour
>> Enter something : kour
>> Traceback (most recent call last):
>>   File "/home/kour/Επιφάνεια εργασίας/kour.py", line 5, in <module>
>>     s = (input('Enter something : '))
>>   File "<string>", line 1, in <module>
>> NameError: name 'kour' is not defined
>> kour at kour-laptop:~$
>>
>> ευχαριστω!!!
>>
>>
>>
>>     
Γιατί επίσης στο πρόγραμμα που έφτιαξες έβαλες σαν όνομα

# Filename: break.py
και το κάλεσες μετά ως kour.py ;;


Υ.Σ. :off topic: χαίρομαι που λαμβάνω ξανα πολλά μηνύματα από τη λίστα




More information about the Ubuntu-gr mailing list