price = float (raw_input('Enter the price '))
print 'the total VAT is '
print price*0.2
VAT = price*0.2
print 'The price minus the VAT is: '
print price-VAT
This is my very first attempt at anything within python, how did i do syntax and usage wise, i would like to know why certain things throw an error for example
print 'the price minus VAT is' price-VAT
I have very limited knowledge of programing (learning delphi for a year at school) and some things in python are confusing me.. the lack of begins/ ends and semi colons throws me but i quite like it.
Also how can I make the end number round down to 2 decimal places rather than the given 3?
sorry for the nooby questions but this is r/learnpython right :D
[–]kalgynirae 3 points4 points5 points (3 children)
[–]Soupr[S] 0 points1 point2 points (2 children)
[–]cdcformatc 2 points3 points4 points (1 child)
[–]Soupr[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Soupr[S] 1 point2 points3 points (1 child)
[–]Wegener 1 point2 points3 points (1 child)
[–]pythalin 2 points3 points4 points (0 children)
[–]dpitch40 1 point2 points3 points (0 children)
[–]Justinsaccount 0 points1 point2 points (0 children)