95.0k views
3 votes
PLEASE HELP 99 POINTS

Read the following Python code:

skittles = 255
hexadecimalSkittles = hex(skittles)
print(hexadecimalSkittles)

Which of the following is the correct output?

A.0bff

B.0xff

C.0yff

D.0zff

User Greg Veres
by
5.2k points

1 Answer

1 vote

255 in decimal = 0xff in hex

so the print output is 0xff and the answer is B.

User Jeff Cook
by
4.4k points