Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a python program for the following Write a graphics method: make stripe (n, ch) that returns n consecutive ch characters. (e.g., makeStripe (5, 'X')

Write a python program for the followingimage text in transcribed

Write a "graphics" method: make stripe (n, ch) that returns n consecutive ch characters. (e.g., makeStripe (5, 'X') should return XXXXX) Use this method to write a program that draws triangles. For example, can use these methods to draw one of these patterns: Try and draw your triangles efficiently (i.e., using loops to minimize the number of statements). Handle choices outside 1 to 5; after printing for the size of out the result string. If the number entered for the size of base is even, use the next higher odd number. Here is the precise dialog required: Program to draw triangles. Written by John Koch. Please choose an option: for triangle pointing up; for triangle pointing down; to print the result; to add a blank line; to stop this program; Enter size of base: 11 Enter character used to draw: * Enter number of blanks preceding each line: 0 Please choose an option: for triangle pointing up; for triangle pointing down; to print the result; to add a blank line; to stop this program; Enter size of base: 11 Enter character used to draw:* Enter number of blanks preceding each line: 0 Please choose an option: for triangle pointing up; for triangle pointing down; to print the result; to add a blank line; to stop this program; Enter size of base: 3 Enter character used to draw: * Enter number of blanks preceding each line: 3 The program should be stored in triangles.py. You may run turning for triangles as many times as you want. This program is due at noon on Tuesday, April 18, 2017. This program is worth 90 points Write a "graphics" method: make stripe (n, ch) that returns n consecutive ch characters. (e.g., makeStripe (5, 'X') should return XXXXX) Use this method to write a program that draws triangles. For example, can use these methods to draw one of these patterns: Try and draw your triangles efficiently (i.e., using loops to minimize the number of statements). Handle choices outside 1 to 5; after printing for the size of out the result string. If the number entered for the size of base is even, use the next higher odd number. Here is the precise dialog required: Program to draw triangles. Written by John Koch. Please choose an option: for triangle pointing up; for triangle pointing down; to print the result; to add a blank line; to stop this program; Enter size of base: 11 Enter character used to draw: * Enter number of blanks preceding each line: 0 Please choose an option: for triangle pointing up; for triangle pointing down; to print the result; to add a blank line; to stop this program; Enter size of base: 11 Enter character used to draw:* Enter number of blanks preceding each line: 0 Please choose an option: for triangle pointing up; for triangle pointing down; to print the result; to add a blank line; to stop this program; Enter size of base: 3 Enter character used to draw: * Enter number of blanks preceding each line: 3 The program should be stored in triangles.py. You may run turning for triangles as many times as you want. This program is due at noon on Tuesday, April 18, 2017. This program is worth 90 points

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain the various job analysis methods.

Answered: 1 week ago

Question

13. You always should try to make a good first impression.

Answered: 1 week ago