Can I deduct my laptop and other accessories as an expense for school as I use it for school? The materials for the class are posted online even though its a actual class

I am taking online classes during the off semester so the computer is required and the class I took this semester was almost all computer work.