How to Install Python 3 and pip 3 for CentOS 6

CentOS 6 doesn’t have native support for Python 3 and corresponding module management tool ‘pip’.  I prefer pip for managing my Python modules.  On CentOS 7 there is a specific yum package for pip(Python 2.7) and pip3(Python 3.4) respectively. However on COS 6 we must install the ‘epel repository’ to get Python 3.4 and there is no specific package for installing ‘pip 3’.  This tutorial is a friendly reminder for myself and others on how to install Python3 & pip3 for CentOS 6.x.

Goals of this post:

  • Install Python 3.4
  • Install pip3
  • Upgrade pip3


Written by mattb in: Linux,Scripts | Tags: , , , , ,

Python Home Work – Online Coffee Shop

My friend is taking a Python course.  I’ve been doing the assignments for practice/fun while helping each other study.  The course has restrictions as to the data/code structures, but please post alternatives!  Thank you  and enjoy!




“Create a program that determines the cost of sending out coffee.

The Konditorei coffee shop sells coffee at $10.50 a pound for their Jonestown Brew, and $16.95 for their Plymouth Jolt.  When the user places an order they will choose one of the two types of coffee, they will enter the number of pounds they are ordering. They will enter in their State. They will pick the Delivery method: Overnight, 2-Day or Standard. They will enter in their payment option: PayPal, Credit Card, Check.

You will display the Coffee type and number of pounds they have ordered, the Sub-Total (price * quantity), the Shipping & Handling Costs, Delivery Costs, the City and State it is being shipped to, the Delivery Method, the Payment type, The Tax and the Total. Format in US currency where appropriate.

The Tax Rate is 9% for Washington, California and Texas, 0% for Oregon or Florida, all other are 7%. The Tax Rate is applied to the Sub-Total. The delivery methods are Overnight ($20.00), 2-Day ($13.00), Standard ($0.00). For Payment options, Paypal has a 3% fee (of the Sub-Total), Credit Cards has a 5% fee (of the Sub-Total), and Checks have a 2% discount (of the Sub-Total),

You are required to use functions. One function to determine the Shipping & Handling costs, another function to determine the Tax and another to determine the Sub-Total.

Use a Try Except block to catch the program from blowing up.”


Click here to see my assignment.

Written by mattb in: Scripts | Tags: ,