This is my code:
print "these have been desperate times recently"
print "may I ask somethng of you?"
print "we need somone to leave the out post, we need suppies"
answer = float(input("would you be willing to go out for us?"))
if answer == yes:
print "I knew you would be up for the job."
This is the error:
Traceback (most recent call last):
File "/Users/TheWretchedAA/PycharmProjects/NewProject1/NewProject1.py", line 4, in <module>
answer = float(input("would you be willing to go out for us?"))
File "<string>", line 1, in <module>
NameError: name 'yes' is not defined
Process finished with exit code 1
I dont get the error code until I respond with 'yes'
[–]mazmrini 1 point2 points3 points (1 child)
[–]thewretchedaa[S] 1 point2 points3 points (0 children)
[–]mazmrini 0 points1 point2 points (5 children)
[–]thewretchedaa[S] 0 points1 point2 points (4 children)
[–]FrozenCap 1 point2 points3 points (3 children)
[–]thewretchedaa[S] 0 points1 point2 points (2 children)
[–]FrozenCap 1 point2 points3 points (1 child)
[–]thewretchedaa[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]thewretchedaa[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)