Using the IDLE development environment, create a
Python script named tryme4.py. (Note: an alternative to IDLE is to use a free account on the pythonanywhere website: https://www.pythonanywhere.com/)
IDLE has both an interactive mode and a script mode. You must use the script mode to develop your script. Your script must use meaningful variable names and have comments that describe what is happening in your script. Comments may describe the assignment of a value to a variable, a computation and the assignment of the result to a variable, or the display of the result.
Write a function in this file called nine_lines that uses the function three_lines (provided below) to print a total of nine lines.
Now add a function named clear_screen that uses a combination of the functions nine_lines, three_lines, and new_line (provided below) to print a total of twenty-five lines. The last line of your program should call first nine_lines and then the clear_screen function.
The function three_lines and new_line are defined below so that you can see nested function calls. Also, to make counting "blank" lines visually easier, the print command inside new_line will print a dot at the beginning of the line:
Submit your Python script file in the posting of your assignment. Your Python script should be either a .txt file or a .py file.
You must execute your script and paste the output produced into a document that you will submit along with your Python script.
It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read for your peer assessors. A placeholder can be output such as "Printing nine lines" or "Calling clearScreen()".
The following items will be used in the grading rubric for this assignment. Make sure that you have addressed each item in your assignment.
Recently Asked Questions
- gallonsused=15 milesdriven=155 gettinggoodmileage=15 notgettinggoodmilieage=10 mpg=milesdriven / gallonsused print(mpg) if mpg > 20: print(gettinggoodmileage)
- Pseudo code Get hourlywage Get hoursworked Is hourlywage > hoursworked display hourlywage else display hoursworked hourlywage=7 hoursworked=12 if hourlywage >
- Need help with a program that allows to players to play the marble game using combinations of loop and conditional statements. In the marble game, you ask the