1.
# one possibility
answer = input("Enter a number: ")
num = float(answer)
print(num)

# a slightly more concise version
num = float(input("Enter a number: "))
print (num)

2.
a. True
b. True
c. True
d. True
e. True
f. False
g. False

3.
def different(a, b):
    return a != b

Note the following does the same thing, but is NOT as good:

def different(a, b):
    if a == b:
        return False
    else:
        return True

(or other ways with an if statement).  Notice that the top definition is MUCH
more concise.

4.
You can emulate any for loop with a while loop by introducing a new
variable for counting up the number of iterations.  You initialize it
before the loop, use < to check the number of iterations, and at the
end of the while loop you increment the counter by 1.

def my_sum(n):
    total = 0

    i = 1

    while i < n+1:
        total += i
        i += 1

    return total