Im currently writing a program that involves money, and I want my output to have a dollar sign before the output but for some reason python insists on putting a space before my output which will not work for me, so im curious if there is any way around this.
amount = int(input("please enter the overall ammount: "))
full_shares = int(input("please enter the number of full shares: "))
print(" ")
half_shares = int(input("please enter the number of halfshares: "))
print(" ")
def split_bill(amount, full_shares, half_shares = 0):
full_share_ammount = amount/full_shares
half_share_ammount = full_share_ammount/2
print("Full share: $", full_share_ammount)
print("Half share: ", half_share_ammount)
split_bill(amount, full_shares, half_shares)
output:
please enter the overall ammount: 1000
please enter the number of full shares: 4
please enter the number of halfshares: 4
Full share: $ 250.0
Half share: 125.0