Jump to content

Translations:KAlgebra/Homework/43/it: Difference between revisions

From KDE UserBase Wiki
Caig (talk | contribs)
Importing a new version from external source
(No difference)

Revision as of 18:48, 28 April 2011

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (KAlgebra/Homework)
We can then either use this directly in '''KAlgebra''':
{{Input |<nowiki>(40*15 + 30*70)/(40 + 30)
</nowiki>}}
{{Output |<nowiki>(40*15+30*70)/(40+30)
=38.5714</nowiki>}}
and get the final temperature, or put in a function if we need to repeat the computation:
{{Input |<nowiki>finalTemp:=(v1,t1,v2,t2)->(v1*t1 + v2*t2)/(v1+v2)</nowiki>}}

Possiamo quindi utilizzare questa direttamente in KAlgebra:

(40*15 + 30*70)/(40 + 30)
(40*15+30*70)/(40+30)
=38.5714

ed ottenere la temperatura finale o metterla in una funzione se abbiamo bisogno di ripetere il calcolo:

TemperaturaFinale:=(v1,t1,v2,t2)-&gt;(v1*t1 + v2*t2)/(v1+v2)