-2
import operator
import csv
question= input("Are you a student or teacher: ")
if question=="student" or "s" or "Student":
    print("You are using the wrong program. Please use the arithmetic quiz")
elif question=="teacher" or "t" or "Teacher":
    print("Hello and welcome to the program which lets you see your students' scores in the arithmetic quizes")

In this code I have tried to use if else statements, but it doesnt work.

I have already tried several ways to make it work but it doesnt.

shilovk
  • 11,718
  • 17
  • 75
  • 74
bob
  • 1
  • Hello and welcome to StackOverflow. Please take some time to read the help page, especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). And more importantly, please read [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal, Complete, and Verifiable Examples](http://stackoverflow.com/help/mcve). – Morgan Thrapp Jul 16 '15 at 17:59

1 Answers1

0

You could check if the input is in a tuple:

question= input("Are you a student or teacher: ")
if question in ("student", "s", "Student"):
    print("You are using the wrong program. Please use the arithmetic quiz")
elif question in ("teacher", "t", "Teacher"):
    print("Hello and welcome to the program which lets you see your students' scores in the arithmetic quizes")
heinst
  • 8,520
  • 7
  • 41
  • 77