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

    3
    ReputationRep:
    So ive got this code in python
    It basically adds the population of 2 countries
    Trouble is I dont think I can use int or float for a word input so the last part where it adds them doesnt work.
    Any advice?

    pastebin.com/SPH01PF8
    Offline

    6
    ReputationRep:
    Your missing a bracket buddy! Put a second bracket under the 'SecondCountry' variable and it will work!


    secondCountry=(input("Please select another country from the same list:\nJapan\nGermany\nIran\nUK\ nCanada\nAustralia\nUSA\nBulgari a\nSweden\n"))
 
 
 
  • 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
    Did TEF Bronze Award affect your UCAS choices?
  • 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

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