Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Let me understand
#1
response = 'Y' or 'N'

answer = "Left"
if answer == "Left":
  print "This is the Verbal Abuse Room, you heap of parrot droppings!"
Output:
This is the Verbal Abuse Room, you heap of parrot droppings!
Please let me understand why should we use "response = 'Y' or 'N'" code? & how it'll work?
Reply
#2
You don't need this statement. Furthermore, 'Y' or 'N' is the same as 'Y' in python.
Reply
#3
This question was answered so many times.... This is my old answer

PS Try to give your questions more meaningful names in the future - it will help your potential helpers
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply
#4
(Aug-02-2018, 12:03 PM)volcano63 Wrote: PS Try to give your questions more meaningful names in the future - it will help your potential helpers

And it will help other people who might have the same problem.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#5
Sir I don't understand how to write a meaningful programming question, so sir if give an example how to write, it'll be very helpful for me in future... Thank you so much for your feedback about my question..
Reply


Forum Jump:

User Panel Messages

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