Find Jobs
Hire Freelancers

Python control structure exampe program -- 2

$10-30 USD

Cerrado
Publicado hace más de 8 años

$10-30 USD

Pagado a la entrega
Comparing Times Mus be hand written into python IDE and written in 3.5 and saved as [login to view URL] file Write a function called time_compare that will have 4 parameters. These four integers represent 2 times, that is hour and minute of the first time, then the hour and minute of the second time. It returns an integer, which will be 0, 1 or 2. 0 means the two times were the same. 1 means that the first time came before the second one. 2 means the first time came after the second one. Example calls: compare(1,2,3,4) would return 1 because 1:02 comes before 3:04. compare (12, 19, 12, 1) would return 2 because 12:19 comes after 12:01. compare (3, 4, 3, 4) would return 0 because they are the same time. Each function that returns a value uses ONE return statement at the bottom of the function definition. Use a variable to hold the return value until execution is done in the function, then return that variable. The compare function does NOT do any input from the keyboard or output to the screen. Its interaction with the rest of the program is through its parameters and its return value. compare the two hours first. If they are different, you have your answer without having to look at the minutes at all. You do NOT want to write a main function for this program. Instead, open your file in your IDE. in the shell, type in a call to the function, like "time_compare(12,15,15,3)". This means you want to compare times 12:15 and 15:03. The result should be a 1. Develop 4 test cases for this program. Example: "first time comes after second time, hour1 after hour2", 13, 20, 8, 15 (as inputs), expected return value is 2. List them in the program file as comments at the bottom of the file Small project looking to spend around $10
ID del proyecto: 8766002

Información sobre el proyecto

7 propuestas
Proyecto remoto
Activo hace 8 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
7 freelancers están ofertando un promedio de $20 USD por este trabajo
Avatar del usuario
A proposal has not yet been provided
$12 USD en 1 día
4,9 (954 comentarios)
7,4
7,4
Avatar del usuario
Hi, I teach algorithms and data structures at a univesity, I can finish this project in less than one hour without any doubt
$25 USD en 3 días
4,7 (97 comentarios)
6,2
6,2
Avatar del usuario
I have seen your requirements. Please open chat. ++++++++++++====================+++++++++++++++=============================
$30 USD en 1 día
4,4 (6 comentarios)
2,7
2,7
Avatar del usuario
A proposal has not yet been provided
$15 USD en 1 día
5,0 (2 comentarios)
1,2
1,2
Avatar del usuario
I can do this project in a couple of hours and it will work perfectly. Couple of years experience in programming
$10 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Hello I am an experienced developer and would be able to help you in the development of this program I have attached a bid being my time and cost if you are interested or need more information please get in touch
$35 USD en 30 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
campton, United States
5,0
13
Forma de pago verificada
Miembro desde ene 12, 2012

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.