Question: 4. Write a program that opens an output file with the filename tell_my_wifi_lover.txt, writes your name to the file, then closes the file. 5. Write
4. Write a program that opens an output file with the filename tell_my_wifi_lover.txt, writes your name to the file, then closes the file.
5. Write a program that opens the tell_my_wifi_lover.txt file that was created by the program in the previous problem, reads your name from the file, displays the name on the screen, then closes the file.
6. Modify the program that reads the tell_my_wifi_lover.txt file to handle any exceptions when running. Use one generic statement that deals with all exceptions.
7. Write a function a function called factorial that will take an integer as a parameter and return the factorial of that integer. You must use a for loop.Decision Structures
1.Write an if else statement that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to variable b.
2. Write an if else statement that determines whether the points variable is outside the range of 9 to 51. If the variables value is outside this range it should display Invalid Points. Otherwise, it should display Valid Points.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
