import examples
This commit is contained in:
parent
98b550be8a
commit
e8216f9619
3
python-temel/import.calistirma.farki.py
Normal file
3
python-temel/import.calistirma.farki.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# test.py
|
||||||
|
|
||||||
|
print(__name__)
|
3
python-temel/import.calistirma.farki.sample.py
Normal file
3
python-temel/import.calistirma.farki.sample.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# sample.py
|
||||||
|
|
||||||
|
import test
|
6
python-temel/import.calistirma.farki.test.py
Normal file
6
python-temel/import.calistirma.farki.test.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# test.py
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
print('yorumlayıcı yoluyla çalıştırılmış')
|
||||||
|
else:
|
||||||
|
print('import ile çalıştırılmış')
|
19
python-temel/import.py
Normal file
19
python-temel/import.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# test.py
|
||||||
|
|
||||||
|
def foo():
|
||||||
|
print('foo')
|
||||||
|
|
||||||
|
def bar():
|
||||||
|
print('bar')
|
||||||
|
|
||||||
|
def tar():
|
||||||
|
print('tar')
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print('program olarak çalışma başladı')
|
||||||
|
foo()
|
||||||
|
bar()
|
||||||
|
tar()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
Reference in New Issue
Block a user