Write code in python using repetition to create the following patterns
999999999888888887777777666666555554444333221
Note; create means you must create with program code, not just assign it as a literal.
The problem
Write a program that asks the user for an integer between 1 and 25 and then generates the pattern that many
times.
Advice: there are two issues to deal with for this program – getting the number and printing out the pattern that
many times. A systematic approach is to
1. get your program working to print the pattern once, (a loop)
2. expand your program to print it multiple times, (nested loop_)
3. Expand to include the request for the number of times.
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
- Please answer in python with showing the codesarrow_forwardDecrease-by-Constant-Factor Fake-Coin puzzle method in Java or C++ to find the fake coin out of n coins. Assume the false coin is lighter. Randomly place the false coin among the n coins. Submit results images and code files.arrow_forwardPython questionarrow_forward
- Alert ⚠️ You guys use AI tool to answer. Last time I found plagiarism and AI detection in my answer. Now If you will use these things I'll surely give multiple downvotes and will report sure.arrow_forwardIn PYTHON Using one of the loop construct draw:- Ten dashed Horizontal lines- Each line of length 150 units (or pixels)- All lines aligned at the same left vertical margin- Lines 10 units apart each other Note- Set the length of solid segment to 10 units- Set the length of the non-visible segment to 5 units Assumption- Use of Turtle library (i will check the answer, it has to be correct)arrow_forwardpython onlystart from here: def ask_for_age(): age = int(input('Enter the age of a family member: ')) return agearrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education