print a rectangle with "-" python

-1

I have the following program, I already made an attempt but it does not work out as they ask, here is the statement and the expected result

  • Perform a program that displays a rectangle formed by height n and base m, where n and m are integer values entered by keyboard.

I DID THE FOLLOWING:

m = input()
n = input()
for i in range(n):
  print"|"
  for j in range(m):
    print "-",

and it gives me as a result if they enter the values 3,4

 |
 - - - |
 - - - |
 - - - |
 - - -

and it would have to stay that way with those values

- - - -
|     |
- - - -
    
asked by Miled 19.05.2018 в 00:05
source

1 answer

-2

Hello, maybe it's a solution ....................

    
answered by 19.05.2018 в 22:38