Sort:  

It depends. Gas price is set for each instruction in the EVM, and you can see exactly which instructions will be run in a smart contract. In this sense, you can absolutely know how much gas a function in a contract will cost. The tricky part is that there can be loops/jumps that will change how many times a function runs, and that can't be known sometimes.

Coin Marketplace

STEEM 0.15
TRX 0.25
JST 0.033
BTC 91296.79
ETH 2283.44
SBD 0.90