I need help with this problem. I know how to solve it to get the answers, but if I put them on the same page, either both of them are incorrect, or only one is correct and the other is incorrect. You are given the number of days that you have been driving, and you will write a Python script to work out the equivalent number of years and weeks. Aim Write a script that takes user input as days and converts the days into years, weeks, and days, and then prints them out. We can ignore leap years. The aim of this activity is to use different arithmetic operators to split days into years, weeks, and days. Steps for Completion Go to your main.py file. On the first line, ask the user how many days they've been driving for and declare the user input. It's an integer, so cast the string. Then calculate the number of years in that set of days. Next, convert the remaining days that weren't converted to years into weeks. Then, get any remaining days that weren't converted to weeks. Print everything out. Finally, run the script with the python3 main.py command. The output should look like Figure 2.5 shown below: Please help me with this
I need help with this problem. I know how to solve it to get the answers, but if I put them on the same page, either both of them are incorrect, or only one is correct and the other is incorrect.
You are given the number of days that you have been driving, and you will write a Python script to work out the equivalent number of years and weeks.
Aim
Write a script that takes user input as days and converts the days into years, weeks, and days, and then prints them out. We can ignore leap years. The aim of this activity is to use different arithmetic operators to split days into years, weeks, and days.
Steps for Completion
-
Go to your main.py file.
-
On the first line, ask the user how many days they've been driving for and declare the user input. It's an integer, so cast the string.
-
Then calculate the number of years in that set of days.
-
Next, convert the remaining days that weren't converted to years into weeks.
-
Then, get any remaining days that weren't converted to weeks.
-
Print everything out.
-
Finally, run the script with the python3 main.py command.
-
The output should look like Figure 2.5 shown below:
Please help me with this
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images