-2
I have a function meses_dias
that receives an argument, a whole number of days, and returns a string that says how many weeks and days that number represents. For example, meses_dias(10)
must return 1 semana(s) e 3 dias(s)
I tried that :
def meses_dias(dias):
return("{} meses(s) e {} dias(s).".format(dias//7))
Could you improve the title of the question, right? The purpose of the title is to summarize the context of the question, but yours does not. Besides, in the code you posted, your string expects two figures: the amount of weeks (which is like months? ) and the number of days over (which has not been calculated).
– Woss
I am new to the site friend and do not know use it yet .
– Cleomir Santos
Write a function called meses_days that gets an argument, an integer day, and return a string that says how many weeks and days that number represents. For example, months(10) should return, "1 week(s) and 3 days(s)."
– Cleomir Santos
the problem is exactly what I typed up.
– Cleomir Santos
@Cleomirsantos welcome to the site. Take the tour and learn how to improve your question (edit, format, etc): https://answall.com/tour
– Ricardo Pontual