Hi ive a kind if tight deadline but it should be very quick as its only a beginners question on python. Deadline is 10/04/18 at 10.30 GMT. No references needed

1 answer below »
Hi ive a kind if tight deadline but it should be very quick as its only a beginners question on python. Deadline is 10/04/18 at 10.30 GMT. No references needed
Answered Same DayMay 09, 2020

Answer To: Hi ive a kind if tight deadline but it should be very quick as its only a beginners question on...

Tanya answered on May 10 2020
156 Votes
Assignment
Conversion of Time Format to 12Hour
Q1
a) Inputs and Outputs of the problem and their
types? What are the admissible values?
A1.
The input of this program is the hour in 24 hour format that we want to convert to 12 hour format.
Input Type – Integer
Admissible values for the input are : 0 to 24
The output of this program is the hour in 12 hour format with proper use of AM and PM.
Output Type – Integer with string(“AM/PM”)
b) (i)
Syntax error in this program are:
· No “ : “ after if and else if statements
· “else if” in python is written as “elif”
· comparison “==” used instead of assignment “=”
· no string quotes near the...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here