Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

if condition

#converting weight into pounds orkilograms.
given_weight=int(input('given_weight'))
unit=input('(K)G or (L)bs')

if unit.upper() == 'K':
    pounds=given_weight/0.45
    print('weight in pounds',pounds)
else:
    kilograms=given_weight*0.45
    print('weight in kg',kilograms)
________________________________________________________________________________
Source by sites.google.com #
 
PREVIOUS NEXT
Tagged: #condition
ADD COMMENT
Topic
Name
1+7 =