subject

Read the problem listed below. Formulate a Decomposition or Outline of the problem. Determine if you have seen this problem before and how it was solved. Start to write your Algorithm, making note of the inputs and outputs that will be required. Write your code, test and debug. Problem:
Create a program in Python that will draw a series of triangles. The program needs to ask the user for the number of triangles to draw and the size of the triangle.

The inputs for this program need to look like the following:

Enter the number of triangles:
Enter the size of the triangles:
Using these two inputs, your program will then draw a series of triangles in the size the user wishes.

For example if the user enters 3 triangles with a size of 5, the following will be the output:

*
**
***


*
**
***


*
**
***

The easiest way to solve this problem is with two loops. One loop draws the triangles and the other repeats the drawing.

When testing your program make sure you test with different sizes and different numbers of triangles as this will be how your code will be run by Codio.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:30, capo9972
Write a program that takes in 3 inputs [players (int type), expected game time (double type), team (char type)] and calculates actual game time (double) based on the following conditions: if the number of players or the expected game time is less than or equal to zero, it should output wrong input if the number of players is greater than 0 and less than or equal to 6 and if they are on the â€r’ or â€r’ team, their game time will be 10% faster. and if they are on the â€b’ or â€b’ team, their game time will be 15% faster. and if they are on the â€y’ or â€y’ team, their game time will be 20% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 6 but less than or equal to 12 and if they are on the â€r’ or â€r’ team, their game time will be 20% faster. and if they are on the â€b’ or â€b’ team, their game time will be 25% faster. and if they are on the â€y’ or â€y’ team their game time will be 30% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 12 but less than or equal to 18 and if they are on the â€r’ or â€r’ team, their game time will be 30% faster. and if they are on the â€b’ or â€b’ team, their game time will be 35% faster. and if they are on the â€y’ or â€y’ team, their game time will
Answers: 2
image
Computers and Technology, 22.06.2019 10:00, fnaflover8505
Businesses allocate resources for their best and most productive uses. the more a resource, the more costly it will be. a manufacturer that requires scarce and costly resources is likely to charge for its products.
Answers: 2
image
Computers and Technology, 22.06.2019 20:00, BreadOfTheBear
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
image
Computers and Technology, 23.06.2019 10:30, badpotterchris
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
You know the right answer?
Read the problem listed below. Formulate a Decomposition or Outline of the problem. Determine if you...

Questions in other subjects: