3 Replies - 9145 Views - Last Post: 24 August 2009 - 04:00 PM Rate Topic: -----

#1 jugaad  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 20-August 09

calculate the volume and surface area of a sphere from its radius

Posted 20 August 2009 - 03:30 AM

I am just looking a help from python experts:

program to calculate the volume and surface area of a sphere from its radius, given as input. Use the following formulas for reference. Limit your numbers to 4 decimal places using string formatting

1. Numerologists claim to be able to determine a person’s character traits based on the “numeric value” of a name. The value of a name is determined by summing up the values of the letters of a name where “a” is 1, “b” is 2 and so on. Write a program that calculates the numeric value of a single name provided as input.

2. Using the file giftFile.txt supplied, write a program that takes each line of the file and writes a thank you note to the giver of the gift. For example, the first letter would read:

Dear Fred,

Thank you for the wonderful sheets.
What a thoughtful wedding gift.

Love
<put your name here>

The thank you letter should be one string and the variables (ie the name, gift and occasion) should be put in using string formatting techniques

3. Ballarat Beans is a mail-order coffee shop which sells coffee for $23 a kilogram plus the cost of shipping. Each order is shipped for $1.20 per kilogram (rounded up to the nearest kilogram). Write a program to calculate the cost of an order. Use string formatting to limit the figures in your output to 2 decimal places.

Is This A Good Question/Topic? 1
  • +

Replies To: calculate the volume and surface area of a sphere from its radius

#2 girasquid  Icon User is offline

  • Barbarbar
  • member icon

Reputation: 108
  • View blog
  • Posts: 1,825
  • Joined: 03-October 06

Re: calculate the volume and surface area of a sphere from its radius

Posted 20 August 2009 - 07:26 AM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: :code:

Thanks.
Was This Post Helpful? 0
  • +
  • -

#3 code_m  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 24
  • View blog
  • Posts: 202
  • Joined: 21-April 09

Re: calculate the volume and surface area of a sphere from its radius

Posted 20 August 2009 - 01:11 PM

pydoc is your friend!
Was This Post Helpful? 0
  • +
  • -

#4 Notorion  Icon User is offline

  • D.I.C Regular

Reputation: 35
  • View blog
  • Posts: 378
  • Joined: 17-February 09

Re: calculate the volume and surface area of a sphere from its radius

Posted 24 August 2009 - 04:00 PM

we won't do the work for you. Please supply a specific question (or multiple questions) and we can help you from there. Are you asking what is the volume and surface area formula of a sphere?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1