Sample Input 1 10 4 Sample Output 1 Enter b: Enter a: *** ***** ***a*** ***aaa*** ***aaaaa*** ***aaaaaaa*** *************** ***************** *******************
Sample Input 1 10 4 Sample Output 1 Enter b: Enter a: *** ***** ***a*** ***aaa*** ***aaaaa*** ***aaaaaaa*** *************** ***************** *******************
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Need help programming this using Python, am currently practicing so I will appreciate so much, thank you expert
- Ask the user for two positive integer inputs a and b
- Keep asking for inputs until all conditions below are satisfied:
- b should be greater than 0
- a should be greater than 0
- b should be greater than a
- (b-a) should be an even number
- Print an isosceles triangle of asterisks (*) with height equal to b
- Inside the big isosceles triangle of height b, there should be a smaller isosceles triangle with height a
- The smaller triangle should be located at the center of the bigger triangle
- The smaller triangle should be made of the letter "a"
Input Format
- b - integer
- a - integer
Constraints
- Keep asking for inputs until all conditions below are satisfied:
- b should be greater than 0
- a should be greater than 0
- b should be greater than a
- (b-a) should be an even number
Output Format
Triangle ASCII art with asterisks and the letter "a"

Transcribed Image Text:Sample Input 0
1
01
1
5
4
5
3
Sample Output 0
Enter b: Enter a: Invalid input.
Enter b: Enter a: Invalid input.
Enter b: Enter a: Invalid input.
Enter b: Enter a: Invalid input.
Enter b: Enter a:
*a*
*ааа*
*ааааа*
*********

Transcribed Image Text:Sample Input 1
10
4
Sample Output 1
Enter b: Enter a:
***
*****
***a***
***aaa***
***aaaaa***
***aaaaaaa***
***
**********
****
**
***********
*****
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images

Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education