Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a python function that takes in a 2d list and prints out the 2d list horizontally so say I have a 2d list like

Create a python function that takes in a 2d list and prints out the 2d list horizontally

so say I have a 2d list like this [[' ', 'L', 'L', 'L', ' '], ['B', '.', '.', '.', 'T'], ['B', '.', '.', '.', 'T'], ['B', '.', '.', '.', 'T'], [' ', 'R', 'R', 'R', ' ']]

and when I run the function print_rec(2d_list):

I want the 2d list to be printed out to the console and display like this

TTT

L...R

L...R

L...R

BBB

and also I want a function that returns a 2d list that when the function is run build_2dlist(wid,hei)

and the function would return the list [[' ', 'L', 'L', 'L', ' '], ['B', '.', '.', '.', 'T'], ['B', '.', '.', '.', 'T'], ['B', '.', '.', '.', 'T'], [' ', 'R', 'R', 'R', ' ']]

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

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions