Question:36
AtypicalvalueforthenumericvariableSiteNumis12.3.
WhichstatementcorrectlyconvertsthevaluesofDeptNumtocharactervalueswhencreatingthevariableSiteAddress?
1.SiteAddress=dept||'/'||input(deptnum,3.1);
2.Get all Questions and Answer from here
3.You need to have paid subscription to access all questions
4.Thanks for considering Python Certification Material
CorrectAnswer:4
YouexplicitlyconvertnumericvaluestocharactervaluesbyusingthePUTfunction.Besuretoselectaformatthatcanreadtheformofthevalues.
Syntax
PUT(source,format.)
RequiredArguments
sourceidentifiestheconstant,variable,orexpressionwhosevalueyouwanttoreformat.Thesourceargumentcanbecharacterornumeric.
format.containstheSASformatthatyouwantappliedtothevaluethatisspecifiedinthesource.Thisargumentmustbethenameofaformatwithaperiodandoptionalwidthand
decimalspecifications,notacharacterconstant,variable,orexpression.Bydefault,ifthesourceisnumeric,theresultingstringisrightaligned,andifthesourceis
character,theresultisleftaligned.Tooverridethedefaultalignment,youcanaddanalignmentspecificationtoaformat:
You can access to full explanation to question and answer from this page.