One way that you can simplify much of this code is by building out a set of classes to represent your different operations. You can then encapsulate the rules for that operation within those classes.
To get started, you can define an abstract Operation class to define the shared properties and methods of the operations:
public abstract class Operation
This is my refactor based on all the suggestions made here. Works quite nice. Thank you all for your help and teaching me a few things.
public class Stopwatch
private DateTime timeStart;
private DateTime timeStop;
private bool isRunning;
private void StartTimer(...
I agree with @Henrik_Hansen's answer. My answer builds upon his.
I absolutely don't see a reason for anything to be static.
Your Stopwatch class should only be for a stop watch. Right now you have commingled a UI into the stopwatch. In the name of Separation of Concerns, I see no reason for any Console.Write or Console.WriteLine in the Stopwatch class....
public static void RunProgram()
Why do you run the application as a method on the Stopwatch class it self?
You have made all the methods (StartTimer(), StopTimer()) private. This means that they only can be run from your RunProgram method, which occupy the main thread of the program and measures nothing. This set up makes the entire effort ...
You need to consider using classes more often.
For your current work, you need two classes (at least) to handle the application process. A class would be for holding the Questions and another class to hold the application logic.
// define the number of levels you need which would be used for random.
// so if the user chose Easy, this means it will pick ...
I would create more classes:
An interface Operation with the functions:
at the moment, you don't need this.
Add this when you want to add questions with multiple possible answers eg. 3/4 and 6/8
checkAnswer takes a String: the one the user answered and return if it is the correct answer.
You then can create ...
Refactor the code so each file type gets it's own function for counting the words like excel_counter() and pdf_counter(). Then use a dict to map file extensions to the functions.
text = docx2txt.process(file)
f = open(file, "r")
text = f.read()
I recommend using pathlib and Path objects instead of os, and you should use a context manager when manipulating files (e.g. with open("file.txt", "r") as file: ...). You also have a lot of repeating code when you're checking extensions, and you keep checking the rest of the if statements even if it's matched an earlier one. And the final else: pass does ...