Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below is my code and it is in PYTHON I have to make a right hollow triangle based on input when I run this code

Below is my code and it is in PYTHON I have to make a right hollow triangle based on input when I run this code the triangle does print out but there are some errors I need help with

the computer is reading some white space and it's telling me to print new line I've tried using print(' ', end = '' ) please help I will rate positively # Suggested steps are:

# 1. Display the prompt # 2. Read in the triangle size into a variable # 3. Print the triangle # This step should be further broken down! # 4. Add the code to check the user input, in case it is negative. __________________________________________

trianglesize = int(input('Enter triangle size:') )

if trianglesize 0. Exiting..." )

row = 1

while(row

_______________________________________________

please test code with 4 , 7 and -6

image text in transcribed

1: One Output is nearly correct, but whitespace differs. See highlights below. Special character legend Input 1 Your output Enter triangle size:* Enter triangle size: Expected output 2. Small even number A Output differs. See highlights below. Special character legend Input 4 Enter triangle size: Your output Enter triangle size: Expected output * +

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

Objects And Databases International Symposium Sophia Antipolis France June 13 2000 Revised Papers Lncs 1944

Authors: Klaus R. Dittrich ,Giovanna Guerrini ,Isabella Merlo ,Marta Oliva ,M. Elena Rodriguez

2001st Edition

ISBN: 3540416641, 978-3540416647

More Books

Students also viewed these Databases questions

Question

=+ Who do you think is right? Why?

Answered: 1 week ago