Question

Please could you write a Pep9 object code that receives numerical input from a user and...

Please could you write a Pep9 object code that receives numerical input from a user and displays a star triangle of that size. The triangle should be an inverted right angle triangle.

Homework Answers

Answer #1

Solution :- A Simple program in Pep 9 Python is given below for printing " * " in the pattern of Inverted right - angled Triangle.

rows = int(input("Enter the total No of Rows  : "))
 
print("Inverted Right Angle Triangle of Stars") 

i = rows

while(i > 0):
    j = i
    while(j > 0):      
        print('* ', end = '  ')
        j = j - 1
    i = i - 1
    print()

So, you please dry run it to understand the code . Then you may implement and try it with python interpretor

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write code in JAVA Write a program that will output a right triangle based on user...
Write code in JAVA Write a program that will output a right triangle based on user specified input height (int) and specified input symbol (char).The first line will have one user-specified character, such as % or *. Each subsequent line will have one additional user-specified character until the number in the triangle's base reaches specified input height. Output a space after each user-specified character, including after the line's last user-specified character. Hint: Use a nested for loop. Ex:If the input...
Please Write code in visual studio Roman Numeral Converter Write a program that asks the user...
Please Write code in visual studio Roman Numeral Converter Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Roman numeral version of that number. Input Validation: Decide how the program should handle an input that is less then 1 or greater than 10.
IN JAVA: Write code (using ArrayLists) to read a line of input from the user and...
IN JAVA: Write code (using ArrayLists) to read a line of input from the user and print the words of that line in sorted order, without removing duplicates. For example, the program output might look like the following: Type a message to sort: to be or not to be that is the question Your message sorted: be be is not or question that the to to
Write a program that will prompt a user to input coordinates for all the corners and...
Write a program that will prompt a user to input coordinates for all the corners and AutoCAD will draw a quadrilateral automatically with your program. The program should draw the quadrilateral on AutoCAD screen and print out all the coordinates with x and y coordinates only. Use GETPOINT, CAR, and CADR for writing the following program. Make sure this program will work with any coordinates that a user may input. None of the numerical coordinates should be in the programming...
IN JAVA PLEASE write code to MERGESORT an array of user inputted OBJECTS you have two...
IN JAVA PLEASE write code to MERGESORT an array of user inputted OBJECTS you have two different classes in the program being made as objects in the main (Bunny class and Dog Class). ask the user "what kind of animal would you like to sort?" user chooses the type of animal (bunny or dog), then you ask the user how big would you like the array of animals to be (maximum array size = 20)? and then you ask what...
JAVA Write code which takes two inputs from the user, a number of sides followed by...
JAVA Write code which takes two inputs from the user, a number of sides followed by a side length, then creates a regular polygon with that number of sides and side length. Sample run: Type the number of sides: 8 Type a side length: 7.5 regular octagon with side length 7.5 Hint: Make sure you use the right data types when taking user input.
Write a program in MIPS ASSEMBLY LANGUAGE.. Take no of students as input from the user,...
Write a program in MIPS ASSEMBLY LANGUAGE.. Take no of students as input from the user, then take marks of 5 subjects for each student from the user. Then find Minimun, Maximum and Median of all the subjects. and comment each line in code also make flow chart
Write a program in C++ coding that asks the user to input an integer between 25...
Write a program in C++ coding that asks the user to input an integer between 25 and 50, inclusive. Utilize a WHILE loop to test for INVALID input. If the input is INVALID, the loop will repeat, and ask the user to try again. The pseudocode looks like this: Prompt user to input an integer between 25 and 50 Accept the input from the user Test for invalid input (HINT: use a while loop and the OR operator with 2...
Write a program that asks the user to input an integer between 25 and 50, inclusive....
Write a program that asks the user to input an integer between 25 and 50, inclusive. Utilize a WHILE loop to test for INVALID input. If the input is INVALID, the loop will repeat, and ask the user to try again. The pseudocode looks like this: Prompt user to input an integer between 25 and 50 Accept the input from the user Test for invalid input (HINT: use a while loop and the OR operator with 2 relational expressions. You...
Write a Python program to calculate the area of a circle. The user needs to input...
Write a Python program to calculate the area of a circle. The user needs to input the value of the radius of the circle. area = 3.14 x radius x radius You should use a function named circlearea to perform the calculation 3. Write a Python program to calculate the area of a square. The user needs to input the value of the length of the square. area = len*len You should use a function named squarearea to perform the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT