➤ Sitio WEB : bit.ly/3rcfjry Curso de Python : bit.ly/CAE_Python Curso de MicroPython: bit.ly/u_Python Curso de Matlab : bit.ly/2Fks7XN Curso Simulink : bit.ly/3a0W8Xr ➤ ¿Quieres ser un experto? bit.ly/2RVvxne
Este es una herramienta sumamente útil Porque muchos ejercicios sin usar funciones nos piden hacer este tipo de ejercicios, de hacer tipo de funciones que convierten temperatura u otras cosas, muy útil, muchas gracias y Saludos
@@SergioACGiraldo Gracias Sergio por contestar. Pero cdo tengas tiempo echale un vistazo. Creo que tienes varios videos y es chip muy muy interesante a pesar del tiempo que lleva diseñado, mas de 20 años.
Si, estoy grabando más videos Dani, de hecho ya a partir de este video 22 empezamos a entrar en Python Intermediario para aplicaciones generales, eso si, toca ir practicando y realizar ejemplos para ir afianzando los conocimientos e ir aprendiendo nuevas funcionalidades.
Adjunto el reto de funciones lambda. Gracias por las propuestas. x=int(input("ingrese un valor de temperatura en ºF: ", )) conv=lambda x:(x-32)/1.8 valor=int(conv(x)) print("El valor corresponde a:",valor,"ºC") y=int(input("ingrese un valor de temperatura en ºC: ", )) conv=lambda y:y*1.8+32 valor=int(conv(y)) print("El valor corresponde a:",valor,"ºF") ingrese un valor de temperatura en ºF: 200 El valor corresponde a: 93 ºC ingrese un valor de temperatura en ºC: 93 El valor corresponde a: 199 ºF # La diferencia es originada en el error de no considerar decimales.
# Reto de funciones anónimas # Conversión de gds C a gds F CtoF = lambda t : 9/5*t + 32 # Conversión de gds F a gds C FtoC = lambda t : 5/9*(t - 32) # Comprobación gF = CtoF(20) gC = FtoC(gF)
Reto # 1: F = input('Ingrese temperatura en °C: ') F = float(F) temp = lambda F: F*1.8 + 32 T = temp(F) print('La temperatura en °F es: ', end =' ') print(T, end =' ') Reto #2 : F = input('Ingrese temperatura en °F: ') F = float(F) temp = lambda F: 0.555*(F - 32) T = temp(F) print('La temperatura en °C es: ', end =' ') print(T, end =' ')
Hola aquí está mi solución al reto, un saludo!! to_celsius= lambda f:((f-32)*5)/9 print(round(to_celsius(98.6),1)) to_farenheit = lambda c: (c*1.8)+32 print(round(to_farenheit(37),1))
celcius = lambda fa : 5/9 * (fa-32) print("La temperatura en Celcius es {:.2f}".format(celcius(80))+ " C") fahreinheit = lambda ce : 9/5 * ce + 32 print("La temperatura en Fahreinheit es {:.2f}".format(fahreinheit(26.67))+ " F") reto funcion anonima con temperatura.py', wdir='C:/Users/rsisn/.spyder-py3/Curso') La temperatura en Celcius es 26.67 C La temperatura en Fahreinheit es 80.01 F
Mi tarea de hoy: # -*- coding: utf-8 -*- """ Created on Fri Jan 28 15:36:03 2022 @author: Carlos Bello """ def main(): cent_a_far= lambda c : 9*c/5+32 far_a_cent= lambda f :(f-32)*5/9 t = int(input('Que valor quieres convertir :')) x = input(' Es Centigrado "C" o Farentheith "F" :').upper()
if x == 'C' : t = cent_a_far(t) print('La equivalencia es', round(t,2), 'Grados Farentheith') elif x == 'F': t = far_a_cent(t) print('La equivalencia es ',round(t,2),' grados centigrados') else: print('Parece que no pusiste C o F ')
print('------------------------------------------------------') print('programa para pasar de farenheit a celsius y viceversa') print('------------------------------------------------------') print(''' 1.Pasar de farenheit a celsius 2.Pasar de celsius a farenheit''') operacion=input(' Escriba el número de la opción que desea elegir: ') if operacion==1: CE=lambda x:(x-32)*5/9 print('el número en farenheit es:',CE(int(input('ingrese el valor que desea convertir: '))),'C') else: operacion==2 CE=lambda x:(x*9/5)+32 print('el número en celsius es:',CE(int(input('ingrese el valor que desea convertir: '))),'F')
➤ Sitio WEB : bit.ly/3rcfjry
Curso de Python : bit.ly/CAE_Python
Curso de MicroPython: bit.ly/u_Python
Curso de Matlab : bit.ly/2Fks7XN
Curso Simulink : bit.ly/3a0W8Xr
➤ ¿Quieres ser un experto? bit.ly/2RVvxne
Este es una herramienta sumamente útil Porque muchos ejercicios sin usar funciones nos piden hacer este tipo de ejercicios, de hacer tipo de funciones que convierten temperatura u otras cosas, muy útil, muchas gracias y Saludos
Gracias Adalberto por el apoyo y tu comentário. Saludos!!
Sergio ya compartir en mis redes sociales tu vídeo
Muy buenos los videos muchas gracias 😊
De nada Nylda, que bueno que le has sacado provecho. Saludos!
Excelente Sergio....!!!
Muchas gracias Ariel, que bueno que te ha gustado. Saludos!!!
Hola Sergio. Le echaste un vistazo al controlador LM629? Tienes videos con ese chip. Un saludo
Por lo pronto no Francisco, he andado ocupado ultimamente, no he podido avanzar con el canal en estas semanas.
@@SergioACGiraldo Gracias Sergio por contestar. Pero cdo tengas tiempo echale un vistazo. Creo que tienes varios videos y es chip muy muy interesante a pesar del tiempo que lleva diseñado, mas de 20 años.
thx
Sergio me gustaría hicieras un curso que continúe, intermedio
Si, estoy grabando más videos Dani, de hecho ya a partir de este video 22 empezamos a entrar en Python Intermediario para aplicaciones generales, eso si, toca ir practicando y realizar ejemplos para ir afianzando los conocimientos e ir aprendiendo nuevas funcionalidades.
Hola! Dejo el resultado de los retos
F_to_C = lambda F: (F - 32) * 5/9
C_to_F = lambda C: (C * 9/5) + 32
Saludos!
Adjunto el reto de funciones lambda. Gracias por las propuestas.
x=int(input("ingrese un valor de temperatura en ºF: ", ))
conv=lambda x:(x-32)/1.8
valor=int(conv(x))
print("El valor corresponde a:",valor,"ºC")
y=int(input("ingrese un valor de temperatura en ºC: ", ))
conv=lambda y:y*1.8+32
valor=int(conv(y))
print("El valor corresponde a:",valor,"ºF")
ingrese un valor de temperatura en ºF: 200
El valor corresponde a: 93 ºC
ingrese un valor de temperatura en ºC: 93
El valor corresponde a: 199 ºF
# La diferencia es originada en el error de no considerar decimales.
# Reto de funciones anónimas
# Conversión de gds C a gds F
CtoF = lambda t : 9/5*t + 32
# Conversión de gds F a gds C
FtoC = lambda t : 5/9*(t - 32)
# Comprobación
gF = CtoF(20)
gC = FtoC(gF)
Excelente Gerard, muy buen trabajo con las funciones anónimas!!
convetf =lambda tc : tc*1.8 + 32
converc =lambda tf : 0.555 *(tf-32)
HOLA SERGIO. EXCEÑENTE LOS VIDEOS
RETO
c_a_f= lambda C: (C*9/5)+32
f_a_c= lambda F: (F-32)*5/9
>>> fahr_to_cels = lambda f: (f - 32) * (5/9)
>>> cels_to_fahr = lambda c: (c * 9/5) + 32
F_C = lambda f: (f-32)/1.8
C_F = lambda c: (c*1.8)+32
Reto # 1:
F = input('Ingrese temperatura en °C: ')
F = float(F)
temp = lambda F: F*1.8 + 32
T = temp(F)
print('La temperatura en °F es: ', end =' ')
print(T, end =' ')
Reto #2 :
F = input('Ingrese temperatura en °F: ')
F = float(F)
temp = lambda F: 0.555*(F - 32)
T = temp(F)
print('La temperatura en °C es: ', end =' ')
print(T, end =' ')
Un saludo
to_celsius = lambda x : (x-32) * 5/9
to_fahrenheit = lambda x : x*9/5 +32
valor=to_celsius(200)
print(valor)
valor=to_fahrenheit(2)
print(valor)
Hola aquí está mi solución al reto, un saludo!!
to_celsius= lambda f:((f-32)*5)/9
print(round(to_celsius(98.6),1))
to_farenheit = lambda c: (c*1.8)+32
print(round(to_farenheit(37),1))
to_farenheit = lambda gc:gc*1.8 + 32
celcius = lambda fa : 5/9 * (fa-32)
print("La temperatura en Celcius es {:.2f}".format(celcius(80))+ " C")
fahreinheit = lambda ce : 9/5 * ce + 32
print("La temperatura en Fahreinheit es {:.2f}".format(fahreinheit(26.67))+ " F")
reto funcion anonima con temperatura.py', wdir='C:/Users/rsisn/.spyder-py3/Curso')
La temperatura en Celcius es 26.67 C
La temperatura en Fahreinheit es 80.01 F
Mi tarea de hoy:
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 28 15:36:03 2022
@author: Carlos Bello
"""
def main():
cent_a_far= lambda c : 9*c/5+32
far_a_cent= lambda f :(f-32)*5/9
t = int(input('Que valor quieres convertir :'))
x = input(' Es Centigrado "C" o Farentheith "F" :').upper()
if x == 'C' :
t = cent_a_far(t)
print('La equivalencia es', round(t,2), 'Grados Farentheith')
elif x == 'F':
t = far_a_cent(t)
print('La equivalencia es ',round(t,2),' grados centigrados')
else:
print('Parece que no pusiste C o F ')
if __name__=='__main__':
main()
print('------------------------------------------------------')
print('programa para pasar de farenheit a celsius y viceversa')
print('------------------------------------------------------')
print('''
1.Pasar de farenheit a celsius
2.Pasar de celsius a farenheit''')
operacion=input('
Escriba el número de la opción que desea elegir: ')
if operacion==1:
CE=lambda x:(x-32)*5/9
print('el número en farenheit es:',CE(int(input('ingrese el valor que desea convertir: '))),'C')
else:
operacion==2
CE=lambda x:(x*9/5)+32
print('el número en celsius es:',CE(int(input('ingrese el valor que desea convertir: '))),'F')
Muy buena esa parte de código, pero te equivocaste en los números del menú