Hey guys im doing the NCSS python challenge and I need help!!
ok so here's my current problems (p.s. my teach cant even help)
PROBLEM 1
************************
# This is a Python file
def fibonacci(n):
return (n <= 1) and 1 or fibonacci(n-1) + fibonacci(n-2)
def decrypt(s):
def helper(s):
return s[::-1]
return helper(s)
I need code 2 ouput this .....
fibonacci
decrypt
helper
so pretty much i need help on callin function names ( I think)
PROBLEM 2
****************
UMTPORMHTRNSDCYTDTIEPREITIPATAGRAIBS
Hint
Yes, that is the whole question.
A very simple technique has been used to encrypt the message. When you decrypt it, you will know how to solve the problem.
It is not a substitution cipher. It's even simpler than that.
UHHHHHH HELP!!!
PROBLEM 3
***********************
Surprisingly, the SETI project has found alien life! They have been transmitting floating-point numbers to earth using a base-5 number system. The five characters for the digits in their system are the five English vowels, ordered alphabetically, so a=0, e=1, i=2, o=3, and u=4 (in decimal).
The aliens use a clever scheme without a separator between the integer and fractional part of the float. They use capital vowels for the integer part, followed by lowercase vowels for the fractional part.
For instance, IUae has an integer part IU and a fractional part ae. The corresponding floating point value in decimal is I*5 + U*1 + A/5 + E/25 = 2*5 + 4 + 0/5 + 1/25 = 14.04. Either the integer or fractional part may appear without the other.
Write a Python function called alien2float that converts a string in the alien number format into a Python float. When we call this function like this, this is what happens:
>>> alien2float("IUae")
14.039999999999999
Your function should return -1 when the string does not conform to the alien notation defined above.
>>> alien2float("iuAE")
-1