functions — and the most-hallucinated bug ai ships8 / 9
arguments, defaults, and the silent wrong-order bug
Write a function called greet that takes a name and an optional mood
parameter. mood should default to "good". The function should return the
string f"hi {name}, hope you're {mood}".
Then call greet twice and print both results:
greet("alex")— uses the defaultgreet("sam", "great")— overrides it
Expected output:
hi alex, hope you're good
hi sam, hope you're great
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _