Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Python 3 or above Write a function named q50 that accepts an Int value n as input, and prints n lines of asterisks where

image text in transcribed

Use Python 3 or above

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

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

What is a fishbone diagram used for?

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago