# How to convert Celsius to farenheit for python

Page 1 of 1

## 4 Replies - 10977 Views - Last Post: 12 December 2012 - 05:51 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=293005&amp;s=797dd7be1eda6739a572141e678833a1&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 iaremarie

Reputation: 0
• Posts: 16
• Joined: 22-September 12

# How to convert Celsius to farenheit for python

Posted 23 September 2012 - 11:43 PM

writing a code that will convert celsius to farenheit

wont work what is wrong?

```def main():

celsius = float(input("What is the Celsius temperature? ")
fahrenheit = 9.0 / 5.0  * celsius + 32
print ("The temperature is ", fahrenheit, " degrees Fahrenheit.")

main()

```

Is This A Good Question/Topic? 0

## Replies To: How to convert Celsius to farenheit for python

### #2 Simown

• Blue Sprat

Reputation: 321
• Posts: 650
• Joined: 20-May 10

## Re: How to convert Celsius to farenheit for python

Posted 23 September 2012 - 11:47 PM

You are missing a closing bracket at the end of line 3

### #3 atraub

• Pythoneer

Reputation: 788
• Posts: 2,095
• Joined: 23-December 08

## Re: How to convert Celsius to farenheit for python

Posted 24 September 2012 - 06:20 PM

While this is a fairly straightforward missing paren, always ALWAYS include the error message.

### #4 jon.kiparsky

• Pancakes!

Reputation: 8429
• Posts: 14,526
• Joined: 19-March 11

## Re: How to convert Celsius to farenheit for python

Posted 24 September 2012 - 06:27 PM

Also, "code" is a mass noun. You don't write "a code", you write a program. If you spend an evening generating lines of python, you might say you're writing "lots of code", but not "lots of codes".

Sorry, little pet peeve.

### #5 eGrove Systems

Reputation: -5
• Posts: 10
• Joined: 09-December 12

## Re: How to convert Celsius to farenheit for python

Posted 12 December 2012 - 05:51 AM

Missing Close bracket at line 3 ,
celsius = float(input("What is the Celsius temperature? "))

Page 1 of 1

 .related ul { list-style-type: circle; font-size: 12px; font-weight: bold; } .related li { margin-bottom: 5px; background-position: left 7px !important; margin-left: -35px; } .related h2 { font-size: 18px; font-weight: bold; } .related a { color: blue; }