Your acquaintance Erin needs to print thousands of handbills for multiple events and they need your help! They've asked you to create the layout for a leaflet containing a header, an optional date, and a list of artists -- each associated with a unicode icon. The goal is to print and distribute your cool new leaflet design - and you'll need all your Python string formatting skills to succeed.
The capitalize_header function should take in an event name and return the capitalized version of the event name.
>>> capitalize_header("fan meetup")
"Fan meetup"Create a new method format_date which takes in a list which contains a date, month, and a year. It displays the formatted date with the format <month_name> <date>, <year>
>>> convert_date([9, 4, 2020])
>>> leaflet.date
"April 9, 2020"
>>> leaflet.set_date([13, 5, 2030])
>>> leaflet.date
"May 13, 2030"When the method display_icons is called, the list of unicode code points passed should be rendered and returned as a list of icons.
>>> leaflet.display_icons(['\U00000040', '\U0001D70B'])
['@', '𝜋']Now you will use all the functions above, and combine them in the print_leaflet function.
It should take an event_name, a list of icons, a list of authors, and an event_date list.
The poster should abide by the layout below.
The leaflet follows a specific layout in the shape of a rectangle:
"*"********************
* *
* 'Concert' *
* *
* June 22, 2020 *
* *
* John 🎸 *
* Benjamin 🎤 *
* Max 🎹 *
* *
********************Your acquaintance Erin needs to print thousands of handbills for multiple events and they need your help! They've asked you to create the layout for a leaflet containing a header, an optional date, and a list of artists -- each associated with a unicode icon. The goal is to print and distribute your cool new leaflet design - and you'll need all your Python string formatting skills to succeed.
The capitalize_header function should take in an event name and return the capitalized version of the event name.
>>> capitalize_header("fan meetup")
"Fan meetup"Create a new method format_date which takes in a list which contains a date, month, and a year. It displays the formatted date with the format <month_name> <date>, <year>
>>> convert_date([9, 4, 2020])
>>> leaflet.date
"April 9, 2020"
>>> leaflet.set_date([13, 5, 2030])
>>> leaflet.date
"May 13, 2030"When the method display_icons is called, the list of unicode code points passed should be rendered and returned as a list of icons.
>>> leaflet.display_icons(['\U00000040', '\U0001D70B'])
['@', '𝜋']Now you will use all the functions above, and combine them in the print_leaflet function.
It should take an event_name, a list of icons, a list of authors, and an event_date list.
The poster should abide by the layout below.
The leaflet follows a specific layout in the shape of a rectangle:
"*"********************
* *
* 'Concert' *
* *
* June 22, 2020 *
* *
* John 🎸 *
* Benjamin 🎤 *
* Max 🎹 *
* *
********************