Python Forum
Multiplication Table Homework
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiplication Table Homework
#3
(Nov-22-2018, 10:43 PM)ichabod801 Wrote: What's wrong with:

if (row * column) % 2 == 0:
    rowString += '#'
after line 25? And I think you want to unindent lines 29 and 30.

That did the trick. I was right there but I just didn't have the code quite right. I was trying along the lines of:
if (row*column) % 2 == 0:
    print(rowString + '#')
Glad to know that I was close.
One other question. Any obvious reason why it seems to be ignoring line 7's if statement? I want it to pull up an error if the user inputs anything under 2 or over 10, but when I test the program it allows any input.
Reply


Messages In This Thread
Multiplication Table Homework - by mcnhscc39 - Nov-22-2018, 10:24 PM
RE: Multiplication Table Homework - by ichabod801 - Nov-22-2018, 10:43 PM
RE: Multiplication Table Homework - by mcnhscc39 - Nov-23-2018, 03:48 PM
RE: Multiplication Table Homework - by ichabod801 - Nov-23-2018, 03:54 PM
RE: Multiplication Table Homework - by mcnhscc39 - Nov-25-2018, 03:48 AM
RE: Multiplication Table Homework - by ichabod801 - Nov-25-2018, 04:41 AM
RE: Multiplication Table Homework - by mcnhscc39 - Nov-25-2018, 04:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  If statements and multiplication elroberto 1 1,784 Jun-22-2022, 05:35 PM
Last Post: deanhystad
  Find the maximum multiplication ercv 3 2,253 Nov-30-2020, 11:55 AM
Last Post: DeaD_EyE
  creating a 3x3 multiplication table aditvaddi 1 3,686 Jun-18-2018, 06:05 AM
Last Post: volcano63
  Multiplication Table funnybone04 4 5,876 Apr-08-2018, 03:03 AM
Last Post: nilamo
  Nested Loop multiplication table SushiRolz 3 10,353 Feb-28-2018, 04:34 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020