0

trying to check for "50" and other strings to see if they follow the if statements that i used and for some reason they don't, can someone help ?

Rakan
  • 15
  • 2
  • [Please do not upload images of code/data/errors when asking a question.](//meta.stackoverflow.com/q/285551) – Michael M. Oct 22 '22 at 22:04

1 Answers1

0

The first elif block always returns True. Use in instead:

elif answer in {"forty-two", "forty two"}:

Take a look here for good explanations

bitflip
  • 3,436
  • 1
  • 3
  • 22
  • 1
    Thank you very much (:. im pretty new to coding soo i dont know what im doing half of the time. – Rakan Oct 22 '22 at 22:09
  • No problem, you're welcome, everyone started at some point! :) I've voted to close the question as it is a duplicate of the post i linked. – bitflip Oct 22 '22 at 22:12