Python Forum
[Learning] 3 hours for one simple exercise
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Learning] 3 hours for one simple exercise
#2
I don't understand why you need all those variables. Is it not sufficient to have a loop variable that goes up in steps of 4 between the correct bounds (see range()) and a variable to keep track of the sum?

Also, your example contains the numbers 12, 52, 92 and 132, none of which are square.
Reply


Messages In This Thread
RE: [Learning] 3 hours for one simple exercise - by ndc85430 - Aug-25-2019, 04:48 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Plz help Ive tried for hours and cant do these three problems VB4 1 2,003 Mar-17-2018, 04:59 AM
Last Post: micseydel
  Simple exercise - how to write in python tomtom55 6 5,030 Sep-28-2017, 07:18 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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