Question: I need help written in Python. Your eccentric friend is at it again. Somehow, they got it in their head, that encoding a message by

I need help written in Python.

I need help written in Python. Your eccentric friend is at it

Your eccentric friend is at it again. Somehow, they got it in their head, that encoding a message by representing the characters as hexidecimal values is a good way to pass secret messages. Can you help them write some code to do this encoding? Write a function named stringToHex() that takes one argument, which is the string to be encoded. Your function should return a new string that is the hex encoded version of the argument with spaces between each pair of hex numbers. Look to http: //www.ascli-table.com if you need help with hex values. stringToHex ("secret") '73 65 63 72 65 74' stringToHex ("Eccentric Friend!!") '45 63 63 65 6e 74 72 69 63 20 46 72 69 65 6e 64 21 21' stringToHex ("Go Army, Beat Navy!") '47 6f 20 41 72 6d 79 2c 20 42 65 61 74 20 4e 61 76 79 21

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!