What happens if you use a Raise statment outside an Exception block?
It should work good I guess but you should give it a condition otherwise your program will never work. Example: [...] spam = float(input("Enter a positive number")) if var <= 0: raise ValueError [...]
The exception is simply raised. The point of raising exceptions though is to catch them so you can handle them for specific cases. Thus there's basically no point in raising an exception if not in a block of code, in whatever kind of block for that matter. That being said, raising exceptions is often used as placeholders on some methods on classes where those are supposed to be subclassed. So yes, use them inside of blocks of code.
It works the same way as if an error (raising an exception automatically) happens outside of try ... except block. The execution of your code will stop, message about the exception will be printed and the program will quit ... the same way as in the first example of "Raising exceptions".