Login and get codingIn the previous Bites, you have successfully transformed an existing script into a CLI using
typer.run()
.In this Bite, you will create a CLI application including more than one command to run, leveraging
app = typer.Typer()
. See the Commands documentation for reference.So, create a command
sum
that sums two numbers and a commandcompare
that compares two numbers:$ python script.py sum 3 5
The sum is 8
$ python script.py compare 3 5
d=5 is greater than c=3Check out the tests for more information on how to format the output.
26 out of 28 users completed this Bite.
Will you be Pythonista #27 to crack this Bite?
Resolution time: ~45 min. (avg. submissions of 5-240 min.)