1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
enot [183]
3 years ago
7

Write a Python script to input time in minutes , convert and print into hours and minutes.

Computers and Technology
1 answer:
cluponka [151]3 years ago
7 0

Answer:

Following are the Python program to this question:  t=float(input("Enter time value in seconds: "))#input time in seconds by user

d = t // (24 * 3600) #calculate day and store in d variable  t= t % (24 * 3600)#calculate time and store in t variable  h = t // 3600#calculate hour and store in h variable  t %= 3600#calculate time and store in t variable  m=t // 60#calculate minutes and store in m variable  t%= 60#calculate time and store in t variable  s = t#calculate second and store in s variable  print("day:hour:minute:second= %d:%d:%d:%d" % (d,h,m,s))#print calculated value

Output:

Enter time value in seconds: 1239876

day:hour:minute:second= 14:8:24:36

Explanation:

Description of the above can be defined as follows:

  • In the above Python program code an input variable "t" is declared, which uses the input method to input value from the user end.
  • In the next step, "d, m, and s" is declared that calculates and stores values in its variable and at the last print, the method is used to print its value.
You might be interested in
15. In cell D6, enter a formula to calculate the percentage of High Priority Customers Sales out of All Customers 2016 sales. (T
BigorU [14]
First, input at the end of column A (containing High Priority Customers Sales Out): =sum(A1:A20) This represents the sum of the values from cell A1 to cell A20. Then, to calculate the percentage of each cell in A, input the formula: =(A1/$A$21)*100 This formula will give you the percentage of A1, if you drag the box down to A20, you will have all the percentages of each sale from A1 to A20. Then, format the cell using the percentage number format with no decimal places. Select column D then right click, "format cells" and select number, adjust the number of decimal places. <span />
6 0
3 years ago
Ep-34 where should you aim a fire extinguisher's stream when extinguishing a fire?
patriot [66]
When extinguishing a fire, the extinguisher's stream should be aimed at the base of the flame using a sweeping motion. This will allow one to kill the fire from the source. This will quickly put out the fire faster applying the extinguisher from the upside.
8 0
4 years ago
What are invoices? A. Documents that convey a company's liabilities B. Documents that convey how much a company was earning and
grandymaker [24]
<span>C. Documents that convey buyers, sellers, and purchases made</span>
5 0
4 years ago
Read 2 more answers
What is computer specification
iren2701 [21]

Answer:

Computer hardware specifications are technical descriptions of the computer's components and capabilities. Processor speed, model and manufacturer. Processor speed is typically indicated in gigahertz (GHz). The higher the number, the faster the computer.

8 0
3 years ago
Claudia has a bachelors degree in computer information systems and she has learned to use some popular software testing tolls wh
mihalych1998 [28]
Coder
website analyser
website maker
poll reader
3 0
3 years ago
Read 2 more answers
Other questions:
  • Technician A says underinflation of a tire causes excessive one-sided wear on one side of the tread. Technician B says overinfla
    11·2 answers
  • HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
    11·1 answer
  • Instructions:Select the correct answer.
    9·1 answer
  • Brian is a computer engineer who writes security software for a banking system. The
    13·1 answer
  • Write a program that will input temperatures for consecutive days. The program will store these values into an array and call a
    9·1 answer
  • Gn guys have an Amazing day!
    12·2 answers
  • Make a jingle about basic of photo editing<br>pls answer me asap​
    10·1 answer
  • Q1) What would be the output of the program shown in the figure?
    7·1 answer
  • kidede secondary school in Kotido district has been selected to participate in the final continental debating competitions with
    9·2 answers
  • missy just hired a software development team to create an educational simulation app for a high school course. she has specific
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!