Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1001853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:44:27+00:00 2026-05-16T07:44:27+00:00

I have been receiving errors when trying to save and run this Python 3.1

  • 0

I have been receiving errors when trying to save and run this Python 3.1 script, and I’m not sure why. I’m new to python, and I’ve been trying some of the Project Euler problems (this is problem 2). I recieve a “invalid syntac” error on “evenfibsum(v)”, and on the colon after “_____main_____”. I’m not sure why this is as I wrote a script for the first Project Euler problem in this same fashion, and it worked fine. I understand that I could write a script without defining a function, but I’m still interested in why this is not working.

def evenfibsum(v):
    a = 1
    b = 2
    r = 0
    while b < v:
        if b%2 == 0:
            r = r + b
            a, b = b, a+b
        else:
            a,b = b, a+b

    print("The sum of the Fibonacci sequence is: ", r)

def main():
    print("This program is designed to find the sum of all even")
    print("numbers from the specificed Fibonacci sequence.")
    v = int(input("What is the highest number you would like to evaluate in the sequence? ")

    evenfibsum(v)

if __name__ == '__main__':
    main()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:44:28+00:00Added an answer on May 16, 2026 at 7:44 am

    There is no closing bracket in v = int(...

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here are the errors I have been receiving; 05-16 04:42:07.579: E/dalvikvm(548): Could not find
I've been tasked with writing a WCF service. (have not done this before.) I've
Okay I have been working on this for about 2 hours and am sure
I'm trying to use beaker cache with SQLAlchemy but I've been receiving errors. Here
I have been trying to get a simple networking test program to run with
I've been using Rspec for a while and for some reason am receiving errors
I'm new in android development. I have been trying to start a new activity
Have been trying to encrypt an xml file to a string so that I
Have been working on this question for a couple hours and have come close
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.