Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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 21Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started