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
MrMuchimi
2 years ago
10

Many people keep time using a 24 hour clock (11 is 11am and 23 is 11pm, 0 is midnight). If it is currently 13 and you set your a

larm to go off in 50 hours, it will be 15 (3pm). Write a Python program to solve the general version of the above problem. Your program should first prompt the user for the time now (in hours) and for the number of hours to wait for the alarm, then store those values as type int variables time_now and wait_time respectively, and finally print the time on the 24 hour clock when the alarm will go off.
Computers and Technology
1 answer:
lozanna [386]2 years ago
6 0

Answer:

<em>The program written in Python is as follows;</em>

time_now = int(input("Time: "))

wait_time = int(input("Alarm: "))

time_now = time_now + wait_time%24

if time_now < 12:

     print(str(time_now)+"am")

else:

     time_now = time_now - 12

     print(str(time_now)+"pm")

Explanation:

This line prompts user for current time

time_now = int(input("Time: "))

This line prompts user for the alarm hours

wait_time = int(input("Alarm: "))

This line calculates the time of the alarm

time_now = time_now + wait_time%24

The following if statement determines if the time will be am or pm

If the time is less than 12, then the time will be in am

<em>if time_now < 12: </em>

<em>      print(str(time_now)+"am") </em>

If otherwise,  then the time will be in pm

<em>else: </em>

<em>      time_now = time_now - 12 </em>

<em>      print(str(time_now)+"pm")</em>

<em></em>

You might be interested in
Describe some common types of charts.​
Mekhanik [1.2K]
Bar chart.
Pie chart.
Line chart.
4 0
2 years ago
Read 2 more answers
An insurance company utilizes SAP HANA for its day-to-day ERP operations. Since they can’t migrate this database due to customer
hichkok12 [17]

Answer: An Internet-routable IP address (static) of the customer gateway's external interface for the on-premises network

Explanation:

Based on the information given, an Internet-routable IP address (static) of the customer gateway's external interface for the on-premises network need to be configured outside of the VPC for them to have a successful site-to-site VPN connection.

The Internet-routable IP address will be used in the identificatiob of each computer through the use of the Internet Protocol for the communication over a network.

3 0
3 years ago
Which application software would be most suitable for writing a resume?
Gemiola [76]

Answer:

Either word or I would suggest using google docs and word and compare.

Explanation:

You can set up a resume in word.

7 0
2 years ago
The __________ certification program has added a number of concentrations that can demonstrate advanced knowledge beyond the bas
Sophie [7]

Answer:

CISSP

Explanation:

The CIDDP concentrations are an extension and development on the knowledge and credentials of the standard CISS certification that improves employability and career advancement

The CISSP concentrations includes

Information System Security Architecture Professional which can be known as ISSAP

Information System Security Engineering Professional which can be known as ISSEP

Information System Security Management Professional which can be known as ISSMP.

4 0
3 years ago
An example of an asset that is both personal-use and personal property is:•A. A computer used solely to monitor the CEO's invest
kati45 [8]

Answer:

Option A is correct.

Explanation:

The following is an illustration of such a resource which is also personal usage as well as corporate capital, that system required primarily to track the contribution of both the Chief executive and also to execute the Form 1040.

  • Option B is incorrect because the system required exclusively to email workers concerning the operations of the organization isn't an illustration of such a resource which is both personal usage and commercial property.
  • Option C is also incorrect because it is seen that the following option is not the illustration of such a scenario.
  • Option D is incorrect because the storage facility being required through the Chief executive to preserve confidential documents is not the correct illustration of such a scenario.
  • Option E is incorrect because there are not all the resources are for the personal as well as commercial use.
7 0
2 years ago
Other questions:
  • Under which market structure, does a firm have the most influence over product pricing? A. Oligopoly B. Perfect competition C. M
    5·1 answer
  • Write a program named as calcPrice.c that formats product information entered by the user and calculate the total amount of purc
    5·1 answer
  • Peace is a fruit of the Spirit that comes from _______ .
    11·1 answer
  • Which of these is the function of a modeler?
    5·2 answers
  • Elizabeth works for a local restaurant at the end of her shift she read she’s required to write in the time that she arrived in
    14·1 answer
  • You are configuring a firewall to use NAT. In the configuration, you map a private IP address directly to a persistent public IP
    9·1 answer
  • 31
    10·1 answer
  • What is the<br> binary code<br> for<br> "DMS"?
    8·1 answer
  • 23. ____________ is a slide that is used as the base design theme for other slides.​
    11·1 answer
  • To create a datetime object for the current date and time, you can use theGroup of answer choicestoday() method of the date clas
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!