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

    2
    ReputationRep:
    Question: How do I print a variable? I want to print the variable Score but not as a string e.g "print 'Score'" as the numerical value of the variable. So if someone collected 10 points their score would be printed as 10 and if another player got 4 their score would be printed as 4.

    I am a beginner at Python so please help me.

    Thanks
    Offline

    19
    ReputationRep:
    print (score)

    ??
    Failing that, Google is your friend.

    Good luck!
    Online

    21
    ReputationRep:
    Unsure what you are asking. Could you maybe take a screenshot of your code or something?
    • TSR Support Team
    Online

    21
    ReputationRep:
    TSR Support Team
    (Original post by The Awakener)
    Question: How do I print a variable? I want to print the variable Score but not as a string e.g "print 'Score'" as the numerical value of the variable. So if someone collected 10 points their score would be printed as 10 and if another player got 4 their score would be printed as 4.

    I am a beginner at Python so please help me.

    Thanks
    Is print Score not working?
 
 
 
Reply
Submit reply
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Updated: July 22, 2016
    Discussions on TSR

  • Latest
  • Personalise
Poll
Do you agree with the PM's proposal to cut tuition fees for some courses?
Useful resources

Groups associated with this forum:

View associated groups

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.