Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please complete with python3! (next-to-the-last-digit of my id is 7) Write a program that reads in two integers, helght and width. Then generates output that

please complete with python3!
(next-to-the-last-digit of my id is 7) image text in transcribed
image text in transcribed
Write a program that reads in two integers, helght and width. Then generates output that is a parallelogram that has its size based on the values in and width. Your code should make sure that the user gives input values that are between 3 and 10 inclusively (so, if the user enters 2 for either the wioth or the height then your code must ask the user for another value). The parallelogram your code generates will need to be tilted based on the value of the next-tothe-last digit of your ID\# (so if your ID\# is 1234567 you would use the 6 digit). The body of the parallelogram must be made out of * (asterisk) characters, and you must print out - (hyphen) characters instead of spaces to show the tilt. For example, if the height of the parallelogram is 4 and the is 7 then your code must generate one of the following outputs (depending on the next-to-the-last digit in your ID\#): - If the next-to-the-last digit of your ID\# is the 0,4, or 8 then tilt the parallelogram to the right by 1 : - If the next-to-the-last digit of your ID\# is the 1,5 , or 9 then tilt the parallelogram to the left by 1 : - If the next-to-the-last digit of your ID\# is the 2 or 6 then tilt the parallelogram to the right by 2 : - If the next-to-the-last digit of your ID\# is the 3 or 7 then tilt the parallelogram to the left by 2 : Note: Both leading and trailing spaces must be shown by (hyphen) characters. Submit a copy of your code. Also submit the output generated by your code running for parallelograms of the following dimensions: - Heights and width - Height of 10 and width 3 - Height 7 and width of (4)

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

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions

Question

Explain the difference between explicit and tacit knowledge.

Answered: 1 week ago