@JPDev@programming.dev to Programmer Humor@programming.dev • 1 year agoExam Answerprogramming.devimagemessage-square130fedilinkarrow-up1796arrow-down111
arrow-up1785arrow-down1imageExam Answerprogramming.dev@JPDev@programming.dev to Programmer Humor@programming.dev • 1 year agomessage-square130fedilink
minus-squareCrazyEddie041linkfedilink19•1 year agoConversations about language aside, the error is that “Monday” is a string with a length of 6.
minus-square@nathanjent@programming.devlinkfedilink4•1 year 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-square@ripcord@lemmy.worldlinkfedilink9•1 year agoThere is a fairly good chance that there has been more info presented in the class than we have been given here.
minus-squareAatubelinkfedilink3•1 year agosir, this is a python variable being assigned to a string literal
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.
sir, this is a python variable being assigned to a string literal
That’s the variable name, not the type