Changes between Version 117 and Version 118 of python
- Timestamp:
- Oct 27, 2016, 2:42:32 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
python
v117 v118 812 812 813 813 print(my_object.variable1) 814 }}} 815 816 === Import modulov in funkcij === 817 818 {{{ 819 #!python 820 821 # -*- coding: utf-8 -*- 822 vsota = 6 823 def sum(x, y): 824 vsota = x + y 825 print("Lokalna vsota je: ", vsota) 826 827 def sub(x, y): 828 raz = x - y 829 print("Lokalna razlika je: ", raz) 830 831 if __name__ == '__main__': 832 833 # Pokličemo funkcijo sum 834 sum(2, 3) 835 sub(6, 4) 836 837 print("Globalna vsota je: ", vsota) 814 838 }}} 815 839