Q1: Write Python code that reads a string that includes two numbers and an operator, e.g. 13+15, and then it prints the result of the mathematical calculation. The first and second numbers may be up to 3 digits (no more than three digits). Also, if there is division by zero, tell the user that it is not possible to do such calculation.
For instance:
The user may enter: "13+15", and then the result is: 28
The user may enter: "13-5", and then the result is: 8
The user may enter: "100 / 0", and the result is: "division by zero is not possible"
The user may enter: "110* 2", and the result is: "220"
When you solve this exercise, use if statements. Further, take care of all the cases where the first and second numbers may be 1, 2, or 3 digits. Also, use string manipulation and search methods that we used in class.
Q2: Write an algorithm and Python code that helps users with troubleshooting an issue of your choice similar to the issue we discussed in class (troubleshooting the printer). The issue you choose must be implemented with nested if statements. Further, it must have at least 10 if/else branches.
Example of troubleshooting a printer: (you should come up with your own example)
System asks the user "I will help you with troubleshooting your printer. Is the printer connected to the electricity (Y/N)?" If the user says "N", tell the user to connect the printer to the electricity and try again. If they say "Y", ask them if the printer is connected to the wifi (Y/N). If the user says "N", tell the user to connect the printer to the wifi and try again. If they say "Y", ask them if the printer has sufficient paper (Y/N). If the user says "N", tell them to insert sufficient paper. Otherwise, ask them "Does your printer have sufficient ink (Y/N)?" If the user says "N", tell them to refill their ink. Otherwise, tell them "Sorry. We cannot help you at this point".