JPDev@programming.dev to Programmer Humor@programming.dev · 6 months agoExam Answerprogramming.devimagemessage-square78fedilinkarrow-up1655arrow-down19
arrow-up1646arrow-down1imageExam Answerprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 6 months agomessage-square78fedilink
minus-squarestoly@lemmy.worldlinkfedilinkarrow-up17arrow-down9·6 months agoI wonder if day length is given separately in a table prior to the question? I’m not sure what they wanted except maybe seconds?
minus-squareAkrenion@programming.devlinkfedilinkarrow-up85·6 months agoIt’s the length of the string. The number of characters is 6. It’s a play on words and a question.
minus-squareCar@lemmy.dbzer0.comlinkfedilinkarrow-up20·6 months agoI’m assuming they wanted the literal length of the string
minus-squarezarkanian@sh.itjust.workslinkfedilinkarrow-up1·6 months agoNaw, they wanted the metaphorical length. Computers are great at metaphors.
minus-squareCrazyEddie041@kbin.sociallinkfedilinkarrow-up11·6 months agoConversations about language aside, the error is that “Monday” is a string with a length of 6.
minus-squarenathanjent@programming.devlinkfedilinkarrow-up4arrow-down2·6 months agoWhat is the type of the variable day though? As it is we have to make multiple assumptions, based on popular programming languages, about the internals of the string type and the print function to assume that it prints “6”.
minus-squareripcord@lemmy.worldlinkfedilinkarrow-up6·6 months agoThere is a fairly good chance that there has been more info presented in the class than we have been given here.
minus-squaremorrowind@lemmy.mllinkfedilinkarrow-up1·6 months agoThat’s the variable name, not the type
I wonder if day length is given separately in a table prior to the question? I’m not sure what they wanted except maybe seconds?
It’s the length of the string. The number of characters is 6. It’s a play on words and a question.
Oh wow. Thanks
I’m assuming they wanted the literal length of the string
That seems to be the consensus.
Naw, they wanted the metaphorical length. Computers are great at metaphors.
Conversations about language aside, the error is that “Monday” is a string with a length of 6.
What is the type of the variable
day
though? As it is we have to make multiple assumptions, based on popular programming languages, about the internals of thestring
type and theprint
function to assume that it prints “6”.There is a fairly good chance that there has been more info presented in the class than we have been given here.
deleted by creator
That’s the variable name, not the type