Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #/home/clockworkpc/Documents/bin/swing_footwork.py
- #
- # Released under a GPLv3 Licence by Clockwork PC 2011
- #
- # www.clockworkpc.com.au
- #
- # You are entitled to the following four freedoms:
- # Freedom 0: To run this program for any purpose
- # Freedom 1: To study how this program works and change it to make it do what you wish
- # Freedom 2: To redistribute copies so you can help your neighbour
- # Freedom 3: To distribute copies of your modified version to others
- #
- ###
- from bisect import bisect
- cut_points = [120, 180, 300]
- kinds = ['Blues', 'Lindy!', 'Charleston or 6-Beat', 'Balboa']
- bpm = int(raw_input('How fast is the music? '))
- style = kinds[bisect(cut_points, bpm)]
- if bpm >= 80:
- print style
- elif bpm < 80:
- print "Get a room."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement