Question: code in python Objectives Work with for loops Part B Name the file for this part lab4b_abc.py, where abc are your initials. Assignment- Use Pythorn

code in python

code in python Objectives Work with for loops Part B Name the

Objectives Work with for loops Part B Name the file for this part lab4b_abc.py, where abc are your initials. Assignment- Use Pythorn Write each of the following loops. The loops must function as specified Name the file for this part lab4a_abc.py, where abc are your initials Write a program that creates a small, single value multiplication table. The program will ask for a value between 1 and 10. If the value is less than 1 or greater than 10, display an error message stating that the input is invalid. Ask the user for the type of shape they wish to draw. The options are rectangle or triangle. If the user enters anything other than a valid shape, display a nice error message and ask again for a shape If the input is valid, display a table that shows the results of multiplying the input value times the numbers one through ten. Make all the columns of numbers be right justified. Write a label for the table at the top of the table All of the shapes will be done using ASCII characters. Create a variable that is assigned the character to be used in the drawing. For starters, assign it the value "**. Using a variable will make it easy to change the character later, if desired For example: Enter a number between 1 and 10: 5 One you have a valid shape, ask for any additional information. The triangle will need a height, and the rectangle will need a width and height. Draw the shapes using the following guidelines Multiplication table for 5 155 25 10 35 15 4 520 5*5=25 6 530 75 35 *5=40 9 545 10550 The right triangle will start with a single character and end with the base of the triangle If the height is 5, the output would be 237, 99px 739 x 5 The rectangle will be an outline of the shape. If the width is 8 and the height is 6, the outout would be

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!