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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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

  1. Go to your main.py file.

  2. 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.

  3. Then calculate the number of years in that set of days.

  4. Next, convert the remaining days that weren't converted to years into weeks.

  5. Then, get any remaining days that weren't converted to weeks.

  6. Print everything out.

  7. Finally, run the script with the python3 main.py command.

  8. The output should look like Figure 2.5 shown below:

 

Please help me with this

 

> Terminal
X +
workspace $ python3 main.py
Days you have been driving: 1000
You have been driving for:
Years: 2
Weeks: 38
Days: 4
workspace $
Transcribed Image Text:> Terminal X + workspace $ python3 main.py Days you have been driving: 1000 You have been driving for: Years: 2 Weeks: 38 Days: 4 workspace $
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Software products
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education