Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to ask a yes or no question on python

answer = input("Enter yes or no: ") 
if answer == "yes": 
    # Do this. 
elif answer == "no": 
    # Do that. 
else: 
    print("Please enter yes or no.") 
Comment

PREVIOUS NEXT
Code Example
Python :: matrix implement 
Python :: selsearch 
Python :: installing blacksheep 
Python :: pyqt serial plotter 
Python :: odoo 12 python version 
Python :: object get in djangi 
Python :: django insert data into database without form 
Python :: HTML default value fo radio button input type based on python variable 
Python :: Wtforms: How to generate blank value using select fields with dynamic choice values 
Python :: Creating 2-dimesional array 
Python :: Python (cpython 2.7.16) sample 
Python :: EDA dataframe get missing and zero values 
Python :: best website to learn python 
Python :: ring Loop Command 
Python :: tkinter disabled but selectable 
Python :: nnumpy matrix count non negative values 
Python :: Lambda expressions using f-string 
Python :: pairplot seaborn legend best position set 
Python :: OfficeApi 
Python :: how to know google index of a page using python 
Python :: python plot draw the goal line 
Python :: python apply file line 
Python :: Quiver Simple Demo 
Python :: login system user exist in textfile python 
Python :: upperWhite = np.array([109, 255, 255]) 
Python :: python run async function without await 
Python :: replace substrings to float 
Python :: execute command dynamo civid 
Python :: python format inverse 
Python :: python groupby 1d array 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =