Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Marks Calculator
#17
(Apr-26-2020, 10:58 AM)anbu23 Wrote: The statements with the same indentation belong to the same group similar to blocks created in other programming language using {}

break is part of for loop due to indentation. Hence it print first row and breaks. It should have same indention as "if".
    if proceed.upper() != "Y":
 
        for studentID, finalGrade in items:
            print(studentID, finalGrade)
            print("Program has terminated, goodbye!")
            break;
Same issue in your implementation of deanhystad's code

Thank you so much anbu23!

Kind regards,

Azure
Reply


Messages In This Thread
Marks Calculator - by azure - Apr-24-2020, 07:12 AM
RE: Marks Calculator - by buran - Apr-24-2020, 07:26 AM
RE: Marks Calculator - by azure - Apr-24-2020, 08:12 AM
RE: Marks Calculator - by buran - Apr-24-2020, 07:43 AM
RE: Marks Calculator - by buran - Apr-24-2020, 08:19 AM
RE: Marks Calculator - by azure - Apr-24-2020, 09:45 AM
RE: Marks Calculator - by anbu23 - Apr-24-2020, 10:49 AM
RE: Marks Calculator - by azure - Apr-24-2020, 11:42 AM
RE: Marks Calculator - by deanhystad - Apr-25-2020, 12:32 PM
RE: Marks Calculator - by azure - Apr-25-2020, 12:43 PM
RE: Marks Calculator - by azure - Apr-26-2020, 08:21 AM
RE: Marks Calculator - by anbu23 - Apr-25-2020, 12:38 PM
RE: Marks Calculator - by anbu23 - Apr-26-2020, 10:58 AM
RE: Marks Calculator - by azure - Apr-27-2020, 12:29 AM
For Loop and while - by azure - Apr-25-2020, 11:49 AM
RE: For Loop and while - by anbu23 - Apr-25-2020, 12:05 PM
RE: For Loop and while - by azure - Apr-25-2020, 12:28 PM

Forum Jump:

User Panel Messages

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