Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please use python to answer this question Write a function named q50 that accepts an Int value n as input, and prints n lines of
please use python to answer this question
Write a function named q50 that accepts an Int value n as input, and prints n lines of asterisks where the first line has n asterisks and each successive line has 2 fewer asterisks until it prints a line with only 1 asterisk. At that point, the q50 function begins increasing each line of asterisks by 2 until it returns back to n asterisks. The completed output must be formatted and aligned to appear in the shape of an hourglass (see the examples below). Rules and Guidelines: Indentation and alignment is a requirement- no credit will be awarded otherwise. . The q50 function should not print if the parameter n is not a positive, odd integer. A correct display is important, but more points are possible if you can achieve the correct output with shorter code (ie: fewer statements). NOTE: You may only use the functions, commands and techniques that we have covered so far this semester and are included in the Zelle textbook (ch's 1-8). Example Output: >q5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started