Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    https://www.dropbox.com/s/6gs1ruby48...oncode.py?dl=0
    Offline

    17
    ReputationRep:
    (Original post by Pridejxjs)
    def menu():
    print("What would you like to do \n 1.Set the generation 0 values \n 2.Display the generation 0 values \n 3.Run the model \n 4.Export data \n 5 Exit";)
    choice=input()

    if choice == "1":
    print("1";)
    choice_1 = input("What is the number of seniles";)
    choice_2 = input ("What is the number of adults";)
    choice_3 = input ("What is the number of juveniles";)
    choice_4 = input ("What is the survival rate for juveniles";)
    choice_5 = input ("What is the survival rate for adults";)
    choice_6 = input ("What is the survival rate for seniles";)
    choice_7 = input ("What is the birthrate";)
    choice_8 = input ("How many generations do you want to model this can be between 5 and 25";)

    Could it be because there are blank spaces between input and the text like input("How many.....") whereas you have input (".....")

    Edit: Ugh, the smiley faces.
    • Thread Starter
    Offline

    0
    ReputationRep:
    I've got rid of the spaces it still said its not defined
    Offline

    17
    ReputationRep:
    (Original post by Pridejxjs)
    I've got rid of the spaces it still said its not defined
    Perhaps it should be choice = input() rather than choice=input(). I don't know though: haven't done Python in 2 years now.
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Has a teacher ever helped you cheat?
    Useful resources

    Study tools

    Rosette

    Essay expert

    Learn to write like a pro with our ultimate essay guide.

    Thinking about uni already?

    Thinking about uni already?

    See where you can apply with our uni match tool

    Student chat

    Ask a question

    Chat to other GCSE students and get your study questions answered.

    Creating

    Make study resources

    Create all the resources you need to get the grades.

    Planner

    Create your own Study Plan

    Organise all your homework and exams so you never miss another deadline.

    Resources by subject

    From flashcards to mind maps; there's everything you need for all of your GCSE subjects.

    Papers

    Find past papers

    100s of GCSE past papers for all your subjects at your fingertips.

    Help out other students

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Write a reply...
    Reply
    Hide
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.