Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CSCI 1170: Open Lab Assignment #3 Friday, 2/23 (turn in box closes Friday Program due: night) Purpose of this assignment: The purpose of this assignment

image text in transcribed
image text in transcribed
CSCI 1170: Open Lab Assignment #3 Friday, 2/23 (turn in box closes Friday Program due: night) Purpose of this assignment: The purpose of this assignment is to understand Input, Processing, and integer calculation and selection statement which are covered in Chapter 2 and 3 For this lab, write a complete Python script that asks the user to enter a number of seconds and then prints the same amount of time in days, hours, minutes, and seconds. For example, 3667 seconds is equivalent to 0 days, 1 hour, 1 minute, and 7 seconds. Print out the result in the format: "1 hour, 1 minute, and 7 seconds." Sample Outputs: Here are the results from running a sample program: SAMPLE RUN #1 Enter number of seconds: 5 5 seconds. SAMPLE RUN #2 Enter number of seconds: 79 1 minute, and 19 seconds. SAMPLE RUN #3 Enter number of seconds: 6547 1 hour, 49 minutes, and 7 seconds. SAMPLE RUN #4 Enter number of seconds: 279585 3 days, 5 hours, 39 minutes, and 45 seconds. SAMPLE RUN #5 Enter number of seconds: 90000 1 day, hour Notice the singular vs. plural and if 0 that unit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions