Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Property price calculation
#4
(Jul-15-2020, 02:08 PM)oli_action Wrote: Is there anyway I can add "€" to the price?
You use what @palladium showed,it's called f-string look at this tutorial.
length = int(input("Please add the length of the property: "))
width = int(input("Please add the width of the property: "))
price_per_m2 = float(input("Please add the price per square meter: "))
total_price = length * width * price_per_m2

print(f"The price of the property is € {total_price}")
Reply


Messages In This Thread
Property price calculation - by oli_action - Jul-15-2020, 11:53 AM
RE: Property price calculation - by palladium - Jul-15-2020, 12:08 PM
RE: Property price calculation - by oli_action - Jul-15-2020, 02:08 PM
RE: Property price calculation - by snippsat - Jul-15-2020, 02:40 PM
RE: Property price calculation - by sridhar - Jul-15-2020, 04:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Finding the price based on industry and number of transactions chandramouliarun 0 939 Jul-26-2022, 07:36 PM
Last Post: chandramouliarun
  Subclass initialized property used in parent class method. Is it bad coding practice? saavedra29 5 1,905 Feb-07-2022, 07:29 PM
Last Post: saavedra29
  class - calculate total price of copies 3lnyn0 1 1,601 Dec-12-2021, 11:43 PM
Last Post: BashBedlam
Exclamation Invalid syntax error(Predict Ethereum Price) lulu43366 2 3,225 Sep-24-2021, 01:24 PM
Last Post: lulu43366
  ABC Module and @property decorator, Pythonic Way? muzikman 21 5,903 Aug-18-2021, 06:08 PM
Last Post: muzikman
  @property vs __set__ / __get__ and __setattr__ / __getattr__ okhajut 1 3,410 Jun-15-2021, 03:48 PM
Last Post: snippsat
  An important question is how to create a zigzag in price data? epsilon 0 1,329 Nov-18-2020, 08:06 PM
Last Post: epsilon
  Can property getters and setters have additional arguments? pjfarley3 2 3,094 Oct-30-2020, 12:17 AM
Last Post: pjfarley3
  Use of @property decorator ruy 16 6,744 Jun-09-2020, 05:29 PM
Last Post: buran
  Problem adding keys/values to dictionary where keynames = "property" and "value" jasonashaw 1 2,086 Dec-17-2019, 08:00 PM
Last Post: jasonashaw

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020