Συντονιστής: konnn

python -v$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.7/site.pyc matches /usr/lib/python2.7/site.py
import site # precompiled from /usr/lib/python2.7/site.pyc
# /usr/lib/python2.7/os.pyc matches /usr/lib/python2.7/os.py
import os # precompiled from /usr/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.7/posixpath.pyc matches /usr/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/lib/python2.7/posixpath.pyc
# /usr/lib/python2.7/stat.pyc matches /usr/lib/python2.7/stat.py
import stat # precompiled from /usr/lib/python2.7/stat.pyc
# /usr/lib/python2.7/genericpath.pyc matches /usr/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/lib/python2.7/genericpath.pyc
# /usr/lib/python2.7/warnings.pyc matches /usr/lib/python2.7/warnings.py
import warnings # precompiled from /usr/lib/python2.7/warnings.pyc
# /usr/lib/python2.7/linecache.pyc matches /usr/lib/python2.7/linecache.py
import linecache # precompiled from /usr/lib/python2.7/linecache.pyc
# /usr/lib/python2.7/types.pyc matches /usr/lib/python2.7/types.py
import types # precompiled from /usr/lib/python2.7/types.pyc
# /usr/lib/python2.7/UserDict.pyc matches /usr/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/lib/python2.7/UserDict.pyc
# /usr/lib/python2.7/_abcoll.pyc matches /usr/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /usr/lib/python2.7/_abcoll.pyc
# /usr/lib/python2.7/abc.pyc matches /usr/lib/python2.7/abc.py
import abc # precompiled from /usr/lib/python2.7/abc.pyc
# /usr/lib/python2.7/_weakrefset.pyc matches /usr/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /usr/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /usr/lib/python2.7/copy_reg.pyc matches /usr/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.7/copy_reg.pyc
# /usr/lib/python2.7/traceback.pyc matches /usr/lib/python2.7/traceback.py
import traceback # precompiled from /usr/lib/python2.7/traceback.pyc
# /usr/lib/python2.7/sysconfig.pyc matches /usr/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /usr/lib/python2.7/sysconfig.pyc
# /usr/lib/python2.7/re.pyc matches /usr/lib/python2.7/re.py
import re # precompiled from /usr/lib/python2.7/re.pyc
# /usr/lib/python2.7/sre_compile.pyc matches /usr/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.7/sre_parse.pyc matches /usr/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.7/sre_parse.pyc
# /usr/lib/python2.7/sre_constants.pyc matches /usr/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /usr/lib/python2.7/sre_constants.pyc
# /usr/lib/python2.7/sitecustomize.pyc matches /usr/lib/python2.7/sitecustomize.py
import sitecustomize # precompiled from /usr/lib/python2.7/sitecustomize.pyc
import encodings # directory /usr/lib/python2.7/encodings
# /usr/lib/python2.7/encodings/__init__.pyc matches /usr/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.7/encodings/__init__.pyc
# /usr/lib/python2.7/codecs.pyc matches /usr/lib/python2.7/codecs.py
import codecs # precompiled from /usr/lib/python2.7/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.7/encodings/aliases.pyc matches /usr/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.7/encodings/aliases.pyc
# /usr/lib/python2.7/encodings/utf_8.pyc matches /usr/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.7/encodings/utf_8.pyc
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.7/lib-dynload/readline.so", 2);
import readline # dynamically loaded from /usr/lib/python2.7/lib-dynload/readline.so
ilias@ilias-pc ~ ➜ python -h | grep -w -A1 \\-v
-v : verbose (trace import statements); also PYTHONVERBOSE=x
can be supplied multiple times to increase verbosity
ilias@ilias-pc ~ ➜ 
Ilias95 έγραψε:Την ίδια έξοδο έχω κι' εγώ.



#!/usr/bin/env python3chmod +x test.py./test.py
Charval έγραψε:Καλημέρα σε όλους! Σήμερα έκανα τα πρώτα δειλά βηματάκια μου στην Python. Πέρασα από την κλασσική αξία του 'Hello World' και έπειτα έφτιαξα το πρώτο προγραμματάκι επίλυσης δευτεροβαθμίων εξισώσεων.
ΌΜΩΣ, ενώ έχω εγκαταστήσει την Python3, όταν ανοίγω terminal και πατώ: Python3 και έπειτα Python3 name.py ώστε να τρέξει το πρόγραμμα, εμφανίζεται το παρακάτω μήνυμα λάθους:
Όταν γράφω κατευθείαν Python3 name.py εμφανίζεται πάλι μήνυμα λάθους ότι δεν υπάρχει τέτοιο αρχείο ή directory.
Το αρχείο .py βρίσκεται στον φάκελο charitos.
Ευχαριστώ εκ των προτέρων!
import test
#!/usr/bin/python3
# -*- coding: utf8 -*-
print ("Welcome to 'Quadratic' solving program.")
a = input("Please, input the first coefficient: ")
while a == 0:
a = input("Be careful! That, is not a quadratic equation. Please, input a non-zero coefficient: ")
b = input("Now, input the second coefficient: ")
c = input("Now, input the constant: ")
from math import sqrt
D = b**2 + (-4)*a*c
if D > 0:
print ("The value of the determinant is: ", D, "and the two real solutions are: ", (-b+sqrt(D))/2*a, (-b-sqrt(D))/2*a)
elif D == 0:
print ("Determinant equals to zero, so we have a double real root: ", (-b)/2*a)
else:
print ("Negative determinant. Two complex solutions: ", complex ((-b)/2*a, sqrt(-D)/2*a), complex ((-b)/2*a, (-sqrt(-D)/2*a)))
print ("Thank you for using Quadratic!")

#!/usr/bin/python3
# -*- coding: utf8 -*-
print ("Welcome to 'Quadratic' solving program.")
a = input("Please, input the first coefficient: ")
while a == 0:
a = input("Be careful! That, is not a quadratic equation. Please, input a non-zero coefficient: ")
b = input("Now, input the second coefficient: ")
c = input("Now, input the constant: ")
from math import sqrt
D = b**2 + (-4)*a*c
if D > 0:
print ("The value of the determinant is: ", D, "and the two real solutions are: ", (-b+sqrt(D))/2*a, (-b-sqrt(D))/2*a)
elif D == 0:
print ("Determinant equals to zero, so we have a double real root: ", (-b)/2*a)
else:
print ("Negative determinant. Two complex solutions: ", complex ((-b)/2*a, sqrt(-D)/2*a), complex ((-b)/2*a, (-sqrt(-D)/2*a)))
print ("Thank you for using Quadratic!")

