F-strings and a simple if/else
Level: Intro (score: 1)
Welcome to our Intro Bites, it's time to gauge where you are with your Python!
Ready? Let's dive straight in using a very exciting Python feature.
The latest way to print to the screen in Python (>= 3.6) is using f-strings
.
In this Bite we'll get you to calculate whether a person is able to drive or not based on their minimum age which is stored in the constant MIN_DRIVING_AGE
.
Print (not return) name is allowed to drive
or name is not allowed to drive
(note there is no period (.) at the end), based on the age being equal or greater than MIN_DRIVING_AGE
.