vendredi 2 mars 2018

in range() statement doesnt work (Python)

`So I am just making something to test if I can make certain outputs based on inputs

Each time I try to enter an answer, nothing happens here I used if elif statements with the in range() in them. Nothing shows up when I type the answer

from random import randint
from termcolor import colored
repeat = True
from termcolor import colored
import time
import sys
import multiprocessing


   print colored("Hello, this is a program to help you practice algebraic 
    expressions.","magenta")
    print("")
     time.sleep(4)
     print colored("Alright let's start with something very basic...\nWhat is x 
     if 
     2x 
     = 32?","magenta")
     prob = int(raw_input())
   if int(prob) in range (16, 16):
     print colored("Well done, you got the warmup correct","yellow")
   elif int(prob) in range(1, 15):
     print colored("Incorrect answer try again","red")

Aucun commentaire:

Enregistrer un commentaire