# How to convert Celsius to farenheit for python

Page 1 of 1

## 4 Replies - 29148 Views - Last Post: 12 December 2012 - 05:51 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=293005&amp;s=2e1bdadda04dd8c05f12febb110b6d28&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: 322
• 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: 828
• Posts: 2,236
• 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

• Beginner

Reputation: 11071
• Posts: 18,909
• 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? "))