User Profile
Collapse
-
Thank you both for the quick reply and informative answers! -
str.split() question
I'm writing a program that has the user input their name, then converts their name to a "numeric value" (basically, take the ASCII value of all of the characters and add them together).
I think I know just about everything I need to write my program, except for one thing:
Since spaces count as 32, I would like to eliminate them from the inputted string. My first guess was to just string.split and then concatenate... -
Thanks -
Run -> Run Module instead of Run -> Python Shell
Also, noticed I was using "Print" instead of "print" - used to Visual Basic, that will throw me off for a while.
cwoozyLeave a comment:
-
I'm on Vista Home Basic (my mistake)
Python v2.4.4
Pretty much just using IDLE.. I didn't even know other editing stuff existed = /Leave a comment:
-
name is not defined
Hello -
I am very new to Python, and I am trying to write a program that returns the Area and Volume of a sphere when the user inputs the radius. I thought I had a solid program while typing it up:
...Code:import math def sphere(): Radius = input("Please enter the radius of the sphere and press Enter: ") Volume = (4/3*math.pi*Radius**3) Area = (4*math.pi*Radius**2) Print
No activity results to display
Show More
Leave a comment: