# Why is the last line showing the all the ' when I run it?

Page 1 of 1

## 2 Replies - 304 Views - Last Post: 04 February 2014 - 06:09 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=339443&amp;s=b2e39d1c90f21703e23e7f4d93379f84&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 bigbeezy

Reputation: 0
• Posts: 1
• Joined: 06-January 13

# Why is the last line showing the all the ' when I run it?

Posted 03 February 2014 - 09:19 PM

celsius = float(input('Enter a temperature: ' ))
fahrenheit = 9.0 / 5.0 * celsius + 32
print("The temperature is", fahrenheit, " degrees Fahrenheit.")
Is This A Good Question/Topic? 0

## Replies To: Why is the last line showing the all the ' when I run it?

### #2 andrewsw

• I'm not here to twist your niblets

Reputation: 4228
• Posts: 15,430
• Joined: 12-December 12

## Re: Why is the last line showing the all the ' when I run it?

Posted 03 February 2014 - 09:54 PM

The code works for me:

```Enter a temperature: 22
The temperature is 71.6  degrees Fahrenheit.
```

### #3 sepp2k

• D.I.C Lover

Reputation: 2200
• Posts: 3,393
• Joined: 21-June 11

## Re: Why is the last line showing the all the ' when I run it?

Posted 04 February 2014 - 06:09 AM

When you say "showing all the '", do you mean that the output is literally as follows?

Quote

("The temperature is", fahrenheit, " degrees Fahrenheit.")

If so, you're using Python 2. In python 2 the syntax for print is print expressions where expressions is a list of expressions either separated by commas or semicolons. Notably there are no parentheses around that list. So when Python sees print(bla,bla), it treats that as print being used on a single value and that value being the tuple (bla, bla). So it prints it as a tuple.

So when trying to print multiple values using Python 2, don't use parentheses.