Q:

Python if statement with multiple clauses

The code im trying to create is to print a wavelength such as radio waves or microwaves based on the wavelength value input.
    userInput = input("Enter wavelength (m) value: ")
    waveValue= float(userInput)

if waveValue > 10**-1 :
   print("Radio Waves")
elif waveValue < 10**-3  :
   print("Microwaves")
elif waveValue < 7*10**-7 :
   print("Infared")
elif waveValue <4-10**-7 :
   print(" Visible light")
elif waveValue <10**-8 :
   print( "Ultraviolet")
elif waveValue <10**-11 :
   print( "X-rays")
elif waveValue >10**-11 :
   print("Gamma rays")
else : 
   print()

Any hints on how I can get the second if statement to work. Every input I put in just outputs radio waves because my arguments does not work properly.
Also there is 5 more inputs that I will have to use elif commands for.

A:

Are you trying to use powers of 10 here?  Because the convention for "10 to the minus 1" for example, is 1.0e-1.  What you have in your code translates to "10 times -1" or -10, which I don't think you intended.
I would rewrite as:
if waveValue > 1.0e-1:
    print("Radio Waves")
elif (waveValue > 1.0e-3) and (waveValue < 1.0e-1):
    print("Micro Waves")

as a prior answer pointed out, it is also more efficient to order the answers so that one side of the comparison is not needed (those values have already been accounted for by earlier tests).
for example:
if waveValue < 1.0e-3:
    <not in current code>
elif waveValue < 1.0e-1:
    print("Micro Waves")
else:
    print("Radio Waves")

