Question: Problem 1. Create a flowchart using Raptor and 2. Write Python code that use nested loops appropriately to draw the following pattern. ## # #

Problem

1. Create a flowchart using Raptor and

2. Write Python code that use nested loops appropriately to draw the following pattern.

##

# #

# #

# #

# #

# #

Test both the flowchart as well as the program.

Do not use the repetition operator * on strings in any manner (for example, to get the spaces between the two #s).

The Raptor flowchart and Python code should prompt for user input and display results exactly as given in the above output.

# Author

followed by a description of what the program reads in (if any), what it prints out (if any), and what the program does with the input to produce the output (that is, essentially, the relationship between the input and output). The documentation will be graded as below.

Criteria Points Author name is given and is the very first line 0.5 Explicitly states (correctly) what the input and output are 0.5 States (correctly) what the program does 0.5 Make sure that no line is wider than 80 columns. Here is an acceptable piece of documentation.

# Author Debbie Debugger # This program computes and prints out the hypotenuse of # a right-angled triangle. # It does this after prompting for and reading in the lengths # of the other two sides.

Observe that in the above documentation, the output and the program functions are combined into one sentence. This is acceptable.

Flowchart

The flowchart must be submitted as a Raptor file.

This section will be evaluated as below separately for each program.

Criteria Points The logic is correct 2 The logic has at least one flaw 1 The logic has more than one flaw 0

Readability and Structure

Your Python code follows the pseudocode. Pay attention to how you name your variables and how you space your tokens. The criteria in the following two tables will be applied to each program. Criteria Points There are no single character identifiers and all identifiers are meaningful 1 There is at least one single character identifier or one that is not meaningful 0 Criteria Points Tokens are properly spaced There are no distracting blank lines or unnecessary comments between lines of Python code. The lines are not wider than 80 columns 1 Violation of any of the above criteria 0 Here is an example of a piece of Python code that would get full credit.

side1 = eval(input("Enter value of side 1: ")) side2 = eval(input("Enter value of side 2: ")) hypotenuse = (side1 ** 2 + side2 ** 2) ** 0.5 print("side 1 =", side1, "side 2 =", side2, "hypotenuse =", hypotenuse)

Here is essentially the same logic with multiple violations of readability and structure.

s1 = eval(input("Enter value of side 1: "))

side2 =eval( input("Enter value of side 2: " )) # unnecessary line hypotenuse = (s1 ** 2 + side2 ** 2)**0.5 print("side 1 =", s1,"side 2 =", side2 , "hypotenuse =", hypotenuse)

Pay attention to the following spacing issues.

Never put a space after a left parenthesis.

Never put a space before a right parenthesis.

Put a space before and after the assignment, arithmetic, and other operators, except unary minus. These include =, +, *, /, //, **, ==, <, >, <=, >=, !=, and, or, not. Put a space before, but not after, unary minus.

Put a space before and after bimary -.

Put a space after a comma.

Never put a space before a comma.

Never put more than one space between tokens when one will do.

Dont put blank lines willy-nilly. It is OK to put a blank line before significantly different pieces of code. This program is short enough that such a situation does not arise.

There can be such a thing as too many comments. If you intersperse the Python code with too many comment lines, the result is a program that is hard to read.

Your program will be read and executed. Each program will be individually graded.

I will read the entire program and see whether it reads the input, computes the results, and produces the output correctly. This called a walkthrough. It must show no obvious errors.

Here is how the walkthrough will be graded.

Criteria Points Follows specs with respect to input 1 Follows specs with respect to processing 1 Follows specs with respect to output 1 There are no correctness issues 1 After a walkthrough, I will execute the program. If it does not execute for whatever reason, you will not get any credit for the next part. So it is necessary for you to execute the program at least once just before submitting it.

Criteria Points The program executes without crashing 1 Reads the input as per specifications 1 Prints the results and they are completely correct for all tests 2 Prints the results and they are sometimes, but not always, correct 1 Notice that the same error may be penalized in the walkthrough as well as in the executions.

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!