windows 10 pro office 2019 pro office 365 pro windows 10 home windows 10 enterprise office 2019 home and business office 2016 pro windows 10 education visio 2019 microsoft project 2019 microsoft project 2016 visio professional 2016 windows server 2012 windows server 2016 windows server 2019 Betriebssysteme office software windows server instagram takipçi instagram beğeni instagram görüntüleme instagram otomatik beğeni facebook beğeni facebook sayfa beğenisi facebook takipçi twitter takipçi twitter beğeni twitter retweet youtube izlenme youtube abone instagram

How to use input inside of print in If Statement in python

Asked By: Anonymous

How to make this work

pizza = 5
Burger = 2
kbab = 2
price = 10
total = price

order = input('what is your order: ')

if order == 'pizza':
    print(input('pizza price is ' + pizza + 'Ok?'))

How to use the input inside if statement

And if they said yes or no they will go to the next Question depend on the last Question


Answered By: Anonymous

Well first of all you need to have the numbers as strings, not integers. Next just remove the print statement and leave the input statement alone. So you should end up with something like this:

pizza = '5'
Burger = '2'
kbab = '2'
price = '10'
total = price

order = input('what is your order: ')

if order == 'pizza':
    input('pizza price is ' + pizza + ' Ok?')

techinplanet staff

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno