Using an assignment expression

Question Q4.3.7

Use the an assignment expression (the walrus operator)

(a) in a while loop to determine the smallest Fibonacci number greater than 5000;

(b) in a while loop to echo back a lower-case version of the user's input (use the input built-in function) until they enter exit.


Solution

To access solutions, please obtain an access code from Cambridge University Press at the Lecturer Resources page for my book (registration required) and then sign up to scipython.com providing this code.