PRacticas De Programacion 1er Semestre
Enviado por IngIrvingAyala • 6 de Abril de 2014 • 8.083 Palabras (33 Páginas) • 433 Visitas
INSTITUTO POLITECNICO NACIONAL
ESCUELA SUPERIOR DE INGENIERIA Y ARQUITECTURA
UNIDAD ZACATENCO
PROGRAMACION
ING DIANA PERALES PALMA
CARPETA DE PRÁCTICAS Y TAREAS
POR:
IRVING ABDIEL AYALA RAMIREZ
2CM09
INDICE
Introducción -------------------- 3
Practica 1------------------------ 4
Practica 2------------------------ 5, a, 8
Practica 3----------------------- 9,10
Practica 4----------------------11,12
Practica 5-----------------------13 a 15
Practica 6 a 9--------------------16 a 25
Practica 10------------------------26
Practica 11---------------------27
Practica 12------------------------28,29
Practica 13--------------------------30
Practica 14-------------------------31,32
Practica 15--------------------------33
Practica 16---------------------------34
Practica 17--------------------------35,36
Practica 18 -----------------------------37
Practica 19-------------------------38,39
Practica 20 ------------------------40,41
Practica 21------------------------42
Tareas y Conclusión------------------------43…
INTRODUCCION
Los presentes trabajos los lleve a cabo a través de mi segundo parcial de programación el cual me proporciono muchos conocimientos tanto teóricos como prácticos.
En estos tiempos es muy importante saber usar una computadora excelentemente bien y eso conlleva a saber programar, la herramienta de hoy y del mañana es la computadora y tenemos que sacarle el mayor provecho posible para facilitarnos la vida.
PRACTICA 1
Formulario
Public Class Form1
Private Sub Btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn1.Click
Dim x, y As Integer
x = Val(Txt1.Text)
Select Case x
Case 5
y = 2 * x - 6
Case 6 To 9
y = 7
Case Else
y = 10 - x * x
End Select
Txt2.Text = y
End Sub
End Class
IMAGEN
PRACTICA 2
FORMULARIO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim km, Toneladas As Single
Dim x, y As String
Toneladas = Val(Txt3.Text)
x = Txt1.Text
km = Val(Txt2.Text)
Select Case x
Case "Bicicleta"
y = 25
Case "Moto"
y = 10 * km
Case "Coche"
y = 10 * km
Case "Camion"
y = 10 * km + 25 * Toneladas
Case Else
y = "entrada no valida"
End Select
Txt4.Text = y
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Form2.Show()
Me.Hide()
End Sub
End Class
FORMULARIO 2
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Temperatura As Single
Dim Y As String
Temperatura = Val(Txt1.Text)
Select Case Temperatura
Case Is > 85
Y = "natacion"
Case 71 To 85
Y = "Tenis"
Case 33 To 70
Y = "Golf"
Case 11 To 32
Y = "Esqui"
Case Is <= 10
Y = "Marcha"
End Select
Txt2.Text = Y
End Sub
End Class
IMAGEN1
IMAGEN 2
PRACTICA 3
FORMULARIO
Public Class FRM3
Private Sub BT1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT1.Click
Dim DIA As String
Dim L, B, H, VE, VC, VT, FA, VR, VAC As Decimal
DIA = TXT1.Text
L = Val(TXT2.Text)
Select Case DIA
Case 4
B = 0.6
H = 1
Case 6
B = 0.7
H = 1.1
Case 8
B = 0.75
H = 1.15
End Select
VE = L * B * H
VC = L * B * 0.1
VT = (3.1416 / 4) * DIA * (0.0254 ^ 2) * L
FA = VE * (30 / 100)
TXT3.Text = VE
TXT4.Text = VC
VR = VE - VC - VT
VAC = VE * FA
TXT6.Text = VR
TXT5.Text = VAC
End Sub
Private Sub BT3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT3.Click
TXT1.Text = ""
TXT2.Text = ""
TXT3.Text = ""
TXT4.Text = ""
TXT5.Text = ""
TXT6.Text = ""
End Sub
Private Sub BT4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
...