Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Program: bookstore()
#5
def bookstore(book, price):
    book=title_it_rtn(book_entry)
    return 'Title: ' + book + ' costs $' + price

book_entry = input("enter book name: ")
price_entry = input("price: ")
info=bookstore(book_entry, price_entry)

bookstore(book_entry, price_entry)
is this perfectly ok?
i have one more question. when i create a function with return value, it outputs with single quotes example:
Output:
'my output'
. why this happens. can i remove this so it looks like
Output:
my output
?
Reply


Messages In This Thread
Program: bookstore() - by muza - Apr-15-2020, 04:23 AM
RE: Program: bookstore() - by ndc85430 - Apr-15-2020, 04:47 AM
RE: Program: bookstore() - by muza - Apr-15-2020, 04:52 AM
RE: Program: bookstore() - by ndc85430 - Apr-15-2020, 04:55 AM
RE: Program: bookstore() - by muza - Apr-16-2020, 01:30 AM

Forum Jump:

User Panel Messages

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