Coffee Shops

November 16, 2018 Shahid K

To know the Python built-in function to format and display the text

Programming Language: Python

Level: Basic

Objective: Text Format and display

Task1: London Coffee Shops

TimeOut London published list of London's best cafés and coffee shops. Some of them included are: The Attendant, Curators Coffee Studio, Department of Coffee & Social Affairs, FreeState Coffee, Look Mum No Hands, Rapha CC, Workshop Coffee Co and Timberyard Seven Dials.

Create a file LondonCoffeeShops.py and write a program that display the names of these places in a layout as shown in the sample run below, with heading: List of some “London Coffee Shops”

An example runs of the program:

>>>

 List of some "London Coffee Shops"       

     * The Attendant       

     * Curators Coffee Studio       

     * Department of Coffee & Social Affairs       

     * FreeState Coffee       

     * Look Mum No Hands       

     * Rapha CC       

     * Workshop Coffee Co       

     * Timberyard Seven Dials

>>>


SAMPLE SOLUTION BELOW


"""

Use the built-in print() function, and use theescape characters \n, \t and \"

"""


print(" List of some \"London Coffee Shops\"\

\n\t* The Attendant\

\n\t* Curators Coffee Studio\

\n\t* Department of Coffee & Social Affairs\

\n\t* FreeState Coffee\

\n\t* Look Mum No Hands\

\n\t* Rapha CC\

\n\t* Workshop Coffee Co\

\n\t* Timberyard Seven Dials" );



background

Have you thought about online lessons?

Online tuition gives you access to brilliant tutors across the country
Connect one-to-one with a tutor or share your lesson with a group for 50% of the tutor's hourly rate! Find a Tutor for One-to-One Find an Online Study Group

Want to know more?

Visit Shahid's profile to find out more and send a message.

Visit Shahid's Profile

Resources others found helpful

Vocabulary - Homonyms

2 x worksheets for teaching homonyms (words with two+ meanings). Useful for 11+ exam prep, vocab …

learn more

Mindfulness, Meditation

Meditation, audio, and practical life skills to manage stress and overwhelm more effectively

learn more

Dyslexia Symptoms in Preschool Children

Signs and symptoms that suggest dyslexia in preschool children

learn more

BMAT

Information about the BMAT including scoring, timing and question type

learn more

Free resources, revision notes and past papers for students

Find revision guides, exam papers and sample essays amongst hundreds of free resources available to students.

Find resources any subjects

Maths resources | Science resources | Music resources | Spanish resources | English resources | French resources