Pls tell me answer

Tell us what’s happening:
Describe your issue in detail here.
can someone tell me the answer pls

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.57

Challenge: Time Calculator

Link to the challenge:

Hi there. We don’t hand out answers on the forum; this is a coding learning platform.

If you show us what you have tried so far and where you are stuck, we’ll try to help you!

def add_time(start, duration,days):
   start("11:06 AM")
   duration("60 SECONDS")
   days("next day")
   print (duration(" ")+start(" ")+days(" "))
add_time("3:00 PM", "3:10")
# Returns: 6:10 PM

add_time("11:30 AM", "2:32")
# Returns: 2:02 PM

add_time("11:43 AM", "00:20")
# Returns: 12:03 PM

add_time("10:10 PM", "3:30")
# Returns: 1:40 AM (next day)

add_time("11:43 PM", "24:20")
# Returns: 12:03 AM (2 days later)

add_time("6:30 PM", "205:12")
# Returns: 7:42 AM (9 days later)

boilerplate-time-calculator-2 - Replit

Please use words to describe the problems you are having and what errors you are seeing.

you can go to the link to see

boilerplate-time-calculator-2 - Replit

Learning to describe problems is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

it says type error and that i am missing 1 required positional argument on days

A type error means that you are using a variable incorrectly.

You are treating start like a string and a function.

The positional arguments bit means that you are calling a function with too few arguments.

You defined add_time to require three arguments but you are only using two.

You seem to be missing key knowledge. You might be doing this project before you are ready and have learned enough basics.

1 Like

You are no where near the point you have to care about error-messages to finish the project.
This is a project that can take even expirienced programmers at least a day to copmlete with writing code, bugfixing and whatnot. Longer if they have to plan out logic and might have to look up methods.

This is not like the previous lessons, where you slap on 1-10 lines of basic code and be done. It will be more like 50-100, depending on aproach.

So far you’ve written 4 lines, which frankly don’t make any sense whatsoever.
You don’t seem to understand how functions work, how to use arguments or even just what data-types you are working with… Not to mention your function doesn’t even have a return despite literally having copied the fact it should return things.

Anyway, giving you a solution would be utterly pointless. You seem to be lacking a lot of basic knowledge for programming. So I don’t see you understanding the solution, even if it was given to you. At which point it would just be doing the task for you - a task meant to test your knowledge. These tasks are meant to teach you programming, so you can get a job with your knowledge. Giving you the solution would be like gifting you a drivers-licence without you ever passing any driving-tests… yeah no?

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.