Answered step by step
Verified Expert Solution
Link Copied!

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 questionimage text in transcribed

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: >q5

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago