Python Forum
Counting numbers in other lines
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Counting numbers in other lines
#7
Stop thinking about how to write the program and think about ways to solve the problem. If I read off some numbers and you had to add them up, how would you do it? Maybe you would write them all down and add them up. What would you do if you didn't have pencil and paper? How would you add them up then?

After you have multiple solutions to the problem you can start thinking about how to translate those answers into Python code. If you have multiple solutions to start with you will end up with a better program. Some solutions will be easy to translate into clean Python code and some will require convoluted Python code.
LewAlbert likes this post
Reply


Messages In This Thread
Counting numbers in other lines - by LewAlbert - Dec-11-2020, 11:50 AM
RE: Counting numbers in other lines - by LewAlbert - Dec-11-2020, 12:36 PM
RE: Counting numbers in other lines - by deanhystad - Dec-11-2020, 02:54 PM
RE: Counting numbers in other lines - by LewAlbert - Dec-12-2020, 06:09 PM
RE: Counting numbers in other lines - by perfringo - Dec-11-2020, 04:31 PM
RE: Counting numbers in other lines - by deanhystad - Dec-12-2020, 07:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Random Generator: From Word to Numbers, from Numbers to n possibles Words Yamiyozx 2 1,475 Jan-02-2023, 05:08 PM
Last Post: deanhystad
  Convert list of numbers to string of numbers kam_uk 5 3,077 Nov-21-2020, 03:10 PM
Last Post: deanhystad
  Regular Expressions in Files (find all phone numbers and credit card numbers) Amirsalar 2 4,138 Dec-05-2017, 09:48 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

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