All Questions Topic List
Algebra Questions
Previous in All Question Next in All Question
Previous in Algebra Next in Algebra
Question Number 46738 by Umar last updated on 30/Oct/18
pleasehelp Writeanalgorithmthatwillfind thesolutionoftheequation f(x)={−x,whenx<0x,whenx⩾0
Commented byhassentimol last updated on 31/Oct/18
Ithinkitmaybethis: askforx ifx<0: return−x else: returnx Ialsothinkitwouldbelikethatonpython: x=float(input(″valueofx?″)) if(x<0): print((−1)∗x) else: print(x)
Commented byUmar last updated on 31/Oct/18
thankyousir
Terms of Service
Privacy Policy
Contact: info@tinkutara.com