# Problem with variable data type

**URL:** <https://discuss.python.org/t/problem-with-variable-data-type/3905>\
**Category:** Python Help\
**Created:** [April 14, 2020, 7:33am UTC](https://discuss.python.org/t/problem-with-variable-data-type/3905 "2020-04-14T07:33:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timthebouncer](https://avatars.discourse-cdn.com/v4/letter/t/0ea827/32.png) [@timthebouncer](https://discuss.python.org/u/timthebouncer)\
**Post date:** [April 14, 2020, 7:33am UTC](https://discuss.python.org/t/problem-with-variable-data-type/3905/1 "2020-04-14T07:33:12Z")

</div>

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
