私は行と列の2つの数字を入力するようにユーザーに促すプログラムを書こうとしています。アスタリスクでグリッド状に出力しますが、ループはfor
です。ユーザー入力による行の掛け算?
userrow = int(input("Enter the size of the row:"))
usercolumn = int(input("Enter the size of the column: "))
row = 0
column = 0
for row in ('*'):
print(row * userrow)
for column in ('*'):
print(column * usercolumn)
#gridlayout = row * column
print("The grid layout is: ", row, column)
for( '*')の行の 'print(row) 'の内容を見てみましょう。なぜそれがそれを行うのか理解していますか? –