Question
Question 3 Write a python script: That has a function like the range() method called myRange(), which takes one parameter (n) and returns a list
Question 3 Write a python script: That has a function like the range() method called myRange(), which takes one parameter (n) and returns a list of numbers from 0 to the n value. Use this function and a for loop to create a list of lists of these numbers. Then loop through each row of this table and fill in the empty entries with zeros. Print this table twice by each row first without zeros and then with. Example Inputs/Outputs: Enter number of column: 5 Without zeros:
[1] [1, 2] [1, 2, 3] [1, 2, 3, 4] [1, 2, 3, 4, 5] With zeros: [1, 0, 0, 0, 0] [1, 2, 0, 0, 0] [1, 2, 3, 0, 0] [1, 2, 3, 4, 0] [1, 2, 3, 4, 5]
Step 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