Hi guys,
I am struggling on resolving a question which says:
- bookstore() takes 2 string arguments: book & price
- bookstore returns a string in sentence form
- bookstore() should call title_it_rtn() with book parameter
- gather input for book_entry and price_entry to use in calling bookstore()
- print the return value of bookstore()
here is my code:
def bookstore(book, price):
price = float(price)
title_it_rtn = (book, price)
return title_it_rtn
title_it_rtn = (input("entry_book: ")), (float(input(“entry_price: “)))
print(“Title:”,“book”, “,costs”,”$”,float(price))
How do I change price into float from string?
result shows that the price is not defined but if I gave it double quotes it wont work.
Thanks for help