Welcome to Westonci.ca, your ultimate destination for finding answers to a wide range of questions from experts. Join our platform to connect with experts ready to provide detailed answers to your questions in various areas. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

Complete the function ConvertToWeeksAndDays to convert totalDays to weeks and days. Return weeks and days using the ElapsedWeekDay struct. Ex: 26 days is 3 weeks and 5 days.

Sagot :

The program is an illustration of functions.

Functions are group of code blocks that perform as one

The ConvertToWeeksAndDays() function in python where comments are used to explain each line is as follows:

#This defines the ConvertToWeeksAndDays function

def ConvertToWeeksAndDays(totalDays):

   #This calculates the number of weeks

   weeks = totalDays//7

   #This calculates the number of days

   days = totalDays %7

   #This prints the number of weeks and days

   print(weeks,"weeks and",days,"days")

Read more about similar programs at:

https://brainly.com/question/25223400