Programming Exercise Exercise 2 og in to ranger using your class account. (Refer to previous labs have questions about how to log in.) Follow the instruction: at a ranger prompt type: idle3 & • To write a new Python program in IDLE, you open a new editin window. Click File on the menu bar, then click New Window. (Alternatively you can press Ctri+N.) Create a source file called cla14.py using the file editor in idle3 Problem Specification. - Include the following information as comments at the top program (file name, your name, today's date, short desc

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Exercise 1 - Answer Questions in D2L - Quizzes -
CLA14
Programming Exercise
Exercise 2
Log in to ranger using your class account. (Refer to previous labs if you
have questions about how to log in.)
Follow the instruction:
• at a ranger prompt type: idle3 &
• To write a new Python program in IDLE, you open a new editing
window. Click File on the menu bar, then click New Window.
(Alternatively you can press Ctrl+N.)
• Create a source file called cla14.py using the file editor in idle3.
• Problem Specification.
- Include the following information as comments at the top of your
program (file name, your name, today's date, short description of
the program)
- Write a program that performs the following tasks:
• The program should have a main function that reads three
inputs - a symbol and 2 integer values, and draws the figures
similar to the sample run.
. function main should call the drawRectangle and
drawTriangle functions.
· drawBar(symbol, length) function should use a loop to draw
horizontal bar of length with the given symbol.
• drawRectangle(symbol, width, height) function takes three
arguments, then calls the drawBar function.
• draw Triangle(symbol, height) function takes two arguments,
then calls the drawBar function.
• Your output should match the given sample runs.
Sample Run 1:
Enter the symbol to draw the shapes:X
Enter the width of the shape: 7
Enter the height of the shape: 5
XXXXXXX
ххххххх
XXXXXXX
XXXXXXX
XXXXXXX
XXX
XXXX
XXXXX
XXXX
XXX
XX
Transcribed Image Text:Exercise 1 - Answer Questions in D2L - Quizzes - CLA14 Programming Exercise Exercise 2 Log in to ranger using your class account. (Refer to previous labs if you have questions about how to log in.) Follow the instruction: • at a ranger prompt type: idle3 & • To write a new Python program in IDLE, you open a new editing window. Click File on the menu bar, then click New Window. (Alternatively you can press Ctrl+N.) • Create a source file called cla14.py using the file editor in idle3. • Problem Specification. - Include the following information as comments at the top of your program (file name, your name, today's date, short description of the program) - Write a program that performs the following tasks: • The program should have a main function that reads three inputs - a symbol and 2 integer values, and draws the figures similar to the sample run. . function main should call the drawRectangle and drawTriangle functions. · drawBar(symbol, length) function should use a loop to draw horizontal bar of length with the given symbol. • drawRectangle(symbol, width, height) function takes three arguments, then calls the drawBar function. • draw Triangle(symbol, height) function takes two arguments, then calls the drawBar function. • Your output should match the given sample runs. Sample Run 1: Enter the symbol to draw the shapes:X Enter the width of the shape: 7 Enter the height of the shape: 5 XXXXXXX ххххххх XXXXXXX XXXXXXX XXXXXXX XXX XXXX XXXXX XXXX XXX XX
Sample Run 2:
Enter the symbol to draw the shapes: #
Enter the width of the shape: 4
Enter the height of the shape: 6
####
##
###
##
Save the file as cla14.py by clicking on File on the menu bar, then
click on "Save as .". Type in cla14.py as the file name in the save
as dialog box.
• Run your program: Hit < F5 > function key to execute the program.
Alternatively you can click on Run on the menu bar and select "Run
Module".
• If you have any errors, fix them, save the changes in the file
window, and re-run the program (<F5>)
Transcribed Image Text:Sample Run 2: Enter the symbol to draw the shapes: # Enter the width of the shape: 4 Enter the height of the shape: 6 #### ## ### ## Save the file as cla14.py by clicking on File on the menu bar, then click on "Save as .". Type in cla14.py as the file name in the save as dialog box. • Run your program: Hit < F5 > function key to execute the program. Alternatively you can click on Run on the menu bar and select "Run Module". • If you have any errors, fix them, save the changes in the file window, and re-run the program (<F5>)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY