Programming Languages

Using IDLE

IDLE is a particular Integrated Development Environment (IDE) that is typically included in a Python installation. An IDE will enable you to use a text editor to create programs (in the case of Python, we refer to the program as a script) as well as execute the program. The IDLE editor understands the syntax of the Python programming language and can help you to debug your program by identifying code that is not valid and must be corrected.

Don't use plagiarized sources. Get Your Custom Essay on
Programming Languages
Just from $13/Page
Order Essay

When you first start IDLE, it will display a window that is the Python interpreter. You can type Python commands directly into this environment, and Python will interpret and execute them.

For all of the assignments in this course, you must create a script. To create a script, select “New window” from the “File” menu. This will open a new script file. You can also use the “Open” or “Recent files” options under the “File” menu to open files that you have previously created.

You can enter your script into the window that opens when you use the “New window” option. Before executing your script, you must save it. The first time you attempt to save a new script, you will need to give it a name. All Python scripts must have the suffix of .py on the filename.

To execute a script, you can select the “Run Module” option under the “Run” menu, or optionally press F5 on your keyboard.

 

Assignment

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:

def new_line():

print(‘.’)

def three_lines():

new_line()

new_line()

new_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.

 

  • Does the assignment implement new_line, three_lines, nine_lines, and clear_screen functions, as well as a main section of the program which calls the functions?
  • Does the assignment demonstrate the use of nested function calls?
  • Does the assignment produce the appropriate output when executed? The output should be recorded in a text file, a Microsoft Word document, or an RTF-formatted document by copying the output from the Python script into the document. The successful script will print out 9 “.” lines first and then 25 “.” lines.
  • Does the program code include comments where appropriate?

</core-format-text></ion-label></ion-item></ion-card></core-loading></addon-mod-workshop-index></ion-content>

The Quizlet
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Us

Exemplary Academic Writing Service

At TheQuizlet.com, you are guaranteed of quality service from our professional writers. We maintain consistent communication with customers after placing an order to avoid missing anything that may compromise the quality of delivered work.

Top Writers

Our hiring process is rigorous to maintain the desired quality that has become the core of our business. We expose potential writers to an uncompromising selection process that enables TheQuizlet to pick the best out of the rest. TheQuizlet boasts of a competent team of writers, editors, and professors who work towards accomplishing your goals.

Plagiarism-Free Papers

TheQuizlet has an in-house plagiarism software that lowers the probability of delivering plagiarized papers to our clients. Referencing is guided by the format specified by a customer when placing an order. Our writers are conversant with all referencing formats that include APA, MLA, Chicago, Harvard, and Vancouver among others.

24/7 Customer Support

We understand the importance of effective communication and as such, TheQuizlet has a dedicated customer support department that responds to all client needs. You can easily contact our team through a chat window at the bottom left corner. Additionally, clients can reach us through support’s email or a telephone number available on our contact page. Feel free to contact us at any time and our team of experts will solve all your problems.

Swift Delivery and 100% Money-back Guarantee

When placing an order, ensure that you specify the correct deadline to help our writers work around the provided timeline. At TheQuizlet, we deliver our tasks before the projected deadline to give time for the customer to proofread the work before submission. In the event we cannot deliver a paper on time, we initiate contact with the client to renegotiate a new deadline.

Unlimited and Free Revisions

We urge all our customers to request for a revision whenever they identify a need to amend the paper. Since we understand your concerns, TheQuizlet.com does not charge for revisions. Nonetheless, we encourage customers to be genuine when requesting for revisions.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

TheQuizlet is a one-stop shop for all your writing needs. We tackle each customer’s needs differently to improve the quality of outcomes and meet your expectations.

Essays

Academic Help Service

TheQuizlet is committed to delivering quality work on time to ensure our clients get the value for their money.

Admissions

Admission Essays and Professional Writing

Admission essays are personal, as opposed to other papers. For this reason, our team will request for any information that will enable them to deliver quality work, which allows you to convince the admissions board on why you should be granted the application.

Reviews

Editing and Proofreading

Our team comprises of qualified researchers, writers, and editors who go through the different papers before delivering them to our clients. Whether your paper is being written from scratch or you want it to be edited, you can trust TheQuizlet for all your needs.

Reviews

Revision Support

After receiving the final draft, you can request for a revision to incorporate various changes that are aligned with your expectations. All our papers are written in line with the latest writing standards.