ovlaada niekto python? vie mi niekto poradit nieco okolo neho (v com sa pise, ci je to tazke, ci to ma buducnost apod.)
lebo rozmyslam ze s tym zacnem... :blind:
python - ovlada ho niekto?
python - ovlada ho niekto?
~eidam
Neviem sice preco prave nad Pythonom rozmyslas, ale budis...
Python sluzi na pisanie najme skriptov ale aj nie moc zlozite programy v nom idu pisat, napr klasicky BitTorrent program je v nom napisany...
Co sa tyka vyuzitia, tak som este nevidel ziaden inzerat, kde by hladali Python programatora...
Python sluzi na pisanie najme skriptov ale aj nie moc zlozite programy v nom idu pisat, napr klasicky BitTorrent program je v nom napisany...
Co sa tyka vyuzitia, tak som este nevidel ziaden inzerat, kde by hladali Python programatora...
CPU : Celeron 1200MHz&1440MHz - 12*120MHz, DVD : Sony DRU 800A,
HDD : Maxtor 40GB 7200ot. 2MB cache, MB : Abit ST6 RAID, RAM : 256 MB SDRAM PC133 PQI + 128 MB SDRAM PC133 Apacer, VGA : Inno3D GeForce 2MX 400 64MB 175MHz/155MHz@205MHz/165MHz, Zdroj : 250W, Zvuk : Sound Blaster 5.1 Live!
HDD : Maxtor 40GB 7200ot. 2MB cache, MB : Abit ST6 RAID, RAM : 256 MB SDRAM PC133 PQI + 128 MB SDRAM PC133 Apacer, VGA : Inno3D GeForce 2MX 400 64MB 175MHz/155MHz@205MHz/165MHz, Zdroj : 250W, Zvuk : Sound Blaster 5.1 Live!
Potrebujem implementovat vyznam return 0 z tohto kodu. Preco je tam ta 0?
RETURN-Ak chceme od funkcie, aby nam vratila nejaku hodnotu, pouzijeme v jej tele prikaz return. Tento prikaz ukonci beh funkcie a vrati hodnotu, ktora je za nim uvedena ako jeho argument, pricom vratit sa daju cele objekty.
==================================================
from Ludmilla import *
from random import *
import const_spells
co = const_spells
reload (co)
class Spell_EXECUTE_RANK_1_1:
""" Execute Rank 1
"""
def CanCast (self, caster, target_dummy):
if target.GetHealth() <= (target.GetMaxHealth() / 5):
return 0
else:
return co.CAST_FAIL_FAILED_ATTEMPT
def SpellEffect (self, caster, target):
if (125 + (caster.GetRage() * 0.3)) <target> target.GetHealth():
target.SetHealth(1)
caster.SetRage(0)
if (125 + (caster.GetRage() * 0.3)) > target.GetHealth():
target.SetHealth(1)
caster.SetRage(0)
RETURN-Ak chceme od funkcie, aby nam vratila nejaku hodnotu, pouzijeme v jej tele prikaz return. Tento prikaz ukonci beh funkcie a vrati hodnotu, ktora je za nim uvedena ako jeho argument, pricom vratit sa daju cele objekty.
==================================================
from Ludmilla import *
from random import *
import const_spells
co = const_spells
reload (co)
class Spell_EXECUTE_RANK_1_1:
""" Execute Rank 1
"""
def CanCast (self, caster, target_dummy):
if target.GetHealth() <= (target.GetMaxHealth() / 5):
return 0
else:
return co.CAST_FAIL_FAILED_ATTEMPT
def SpellEffect (self, caster, target):
if (125 + (caster.GetRage() * 0.3)) <target> target.GetHealth():
target.SetHealth(1)
caster.SetRage(0)
if (125 + (caster.GetRage() * 0.3)) > target.GetHealth():
target.SetHealth(1)
caster.SetRage(0)
CPU AMD Phenom II X6 1070T, Motherboard Gigabite GA-970A-UD3, Vengeance - 8GB Dual channel DDR3 memory kit - 1600 Mhz, VGA Gigabite Radeon R9 280X Windforce OC version, Case Coolermaster Centurion 5 II + extra fans NOCTUA NF-S12B redux-1200(back), NOCTUA NF-P14s redux 1200(up)