# Newbie Coder need quick help

Page 1 of 1

## 5 Replies - 468 Views - Last Post: 02 October 2017 - 11:59 PMRate 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=406409&amp;s=08d0545ebdf0d8fcb09039b82fcb8203&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 slooth

Reputation: 0
• Posts: 2
• Joined: 21-September 17

# Newbie Coder need quick help

Posted 21 September 2017 - 10:56 AM

So I just started an a level computer science course and lets just say it's been difficult considering I haven't had any experience. Got stuck on this question I had to do so need some help. Had to ask for an amount of seconds to be converted into hours,minutes and seconds. This is what I have so far:

```sec = int(input("Input your number of seconds: "))
s = sec % 60
h = sec//3600
m = sec%3600//60
print(" hours" h, " minutes" m, " seconds" s,)

```

might just be my terrible maths thats made me go wrong somewhere heyho

This post has been edited by ndc85430: 03 October 2017 - 09:34 PM
Reason for edit:: Added code tags.

Is This A Good Question/Topic? 0

## Replies To: Newbie Coder need quick help

### #2 modi123_1

• Suitor #2

Reputation: 14097
• Posts: 56,501
• Joined: 12-June 08

## Re: Newbie Coder need quick help

Posted 21 September 2017 - 11:04 AM

What's the issue?

### #3 DK3250

• Pythonian

Reputation: 407
• Posts: 1,313
• Joined: 27-December 13

## Re: Newbie Coder need quick help

Posted 21 September 2017 - 11:24 AM

Apart from three missing comma in the print statement, I don't see any problem.

### #4 slooth

Reputation: 0
• Posts: 2
• Joined: 21-September 17

## Re: Newbie Coder need quick help

Posted 21 September 2017 - 11:46 AM

modi123_1, on 21 September 2017 - 11:04 AM, said:

What's the issue?

when i try to run it, it comes up with syntax error highlighting the h in the print statement

DK3250, on 21 September 2017 - 11:24 AM, said:

Apart from three missing comma in the print statement, I don't see any problem.

well I added commas and it works so i learnt something new today

### #5 modi123_1

• Suitor #2

Reputation: 14097
• Posts: 56,501
• Joined: 12-June 08

## Re: Newbie Coder need quick help

Posted 21 September 2017 - 11:51 AM

.. and knowing is half the battle!

### #6 albert003

• D.I.C Regular

Reputation: 17
• Posts: 495
• Joined: 15-December 14

## Re: Newbie Coder need quick help

Posted 02 October 2017 - 11:59 PM

modi123_1 GI Joe!!!!

Ok, so take a look at the print statement. What do you see that could be causing the problem?. Go back to your notes from class or the book you're using and see what the problem could be.

This post has been edited by albert003: 02 October 2017 - 11:59 PM