working py and cpp text dollar solns