1 Replies - 293 Views - Last Post: 20 March 2013 - 09:50 PM Rate Topic: -----

#1 ZkP  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 03-November 12

Problem with Variables

Posted 20 March 2013 - 09:09 PM

So I'm really new to python, and I'm trying to make a pi calc as a starter.. Python keeps saying there's an error with my variable "s".
import math
print("Pi Calc at your service!")
x = int(input("Your Radius -> ")
s = math.pi * x
print ("Your pi answer is " + s)

I've tried alot of things, but nothing works. Sorry for my nooby-ness. hehe.
Is This A Good Question/Topic? 0
  • +

Replies To: Problem with Variables

#2 iKyriaki  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 8
  • Joined: 30-November 12

Re: Problem with Variables

Posted 20 March 2013 - 09:50 PM

The problem is this line:
x = int(input("Your Radius -> ")
which should be
x = int(input("Your Radius -> "))

Remember for every open brace you have, a close brace has to follow it.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1