I don't see where to post my question, so here goes.
in Introduction to Programming Using Python, under Converting Types in Python LAB environment.
The second last assignment has us convert an integer variable to a character type. o=100 and for some reason, when I ask for the value of 100 using chr(o), it gives me d.
where did d come from? it seems completely random.
can explain how d comes into this equation?
thanks
-
Python question
-
sorry, it won't let me edit the question.
I'm not sure that my question was clear.
The actual code is the following:#Convert an integer variable to character type
o=100
print(‘The character value of number 100 is:’,chr(o))
The number of the character value of 100 is d.
Where did d come from?
How does the character value equal to the letter d? -
please correct me if I'm wrong, but I'm guessing it has to do with the ASCII Table.
100=d