assignment. The base width of the pyramid is determined by a character the user enters. If the user enters the letter o, the following pyramid will be printed. It can be assumed that the screen width is 80 characters. The following assignments make use of functions with return values ("fruitful functions"). So if the user enters the letter o it will print the ******The input is not always o, the input o is just an example, so the user can enter also a letter like u or w or something else******** Besides that the code may not have the charArray = 'abcdefghijklmnopqrstuvwxyz', but it needs to have the range code like (range(97,123)) or something else
Write a program that prints a pyramid made of letters in the middle of the screen. Use functions with parameters for this assignment. The base width of the pyramid is determined by a character the user enters. If the user enters the letter o, the following pyramid will be printed. It can be assumed that the screen width is 80 characters. The following assignments make use of functions with return values ("fruitful functions").
So if the user enters the letter o it will print the
******The input is not always o, the input o is just an example, so the user can enter also a letter like u or w or something else********
Besides that the code may not have the charArray = 'abcdefghijklmnopqrstuvwxyz', but it needs to have the range code like (range(97,123)) or something else
Step by step
Solved in 2 steps with 2 images