The document contains examples of programming exercises in Visual Basic. It includes 10 exercises demonstrating basic concepts like printing text, performing mathematical operations, working with variables and conditional statements. It also includes 8 exercises showing the use of functions, objects, and graphical user interface elements like buttons and text boxes.
The document contains descriptions of 20 coding exercises in Spanish that demonstrate basic programming concepts like variables, conditionals, loops, functions, objects, and graphical user interfaces using the Gambas programming language. The exercises cover topics such as: printing text, mathematical operations, finding the maximum of 3 numbers, validating ID numbers, calculating factorials, Fibonacci sequences, creating classes for vehicles and living things, building a basic calculator app, and drawing shapes.
This document contains 10 programming exercises in GAMBAS, a BASIC-like programming language. The exercises cover basic concepts like variables, input/output, conditional statements, loops, functions, and objects. They include calculating sums and finding the maximum of 3 numbers, validating ID numbers, Fibonacci series, and simple graphical programs for a calculator and digital clock. The final exercises demonstrate creating objects for superheroes and living beings, as well as graphical programs for a bouncing circle, coloring application, and screensaver.
The document contains 19 coding exercises in Visual Basic using GAMBAS. The exercises cover basic concepts like printing text, performing mathematical operations, using conditional statements, creating functions, working with objects and classes, building graphical user interfaces, and creating simple games and applications like a calculator. Overall, the exercises demonstrate fundamental programming techniques in a step-by-step manner to teach Visual Basic syntax and programming logic.
This document contains 10 programming exercises in Gambas, a visual programming language. It includes exercises to calculate sums, find the largest of three numbers, validate ID numbers, calculate factorials, and export percentages. It also includes graphical user interface examples like a calculator application, clock, and random number guessing game. The exercises demonstrate basic programming concepts like variables, conditional statements, loops, and functions.
This document contains 10 programming exercises in Gambas, a visual programming language. The exercises cover basic concepts like variables, conditionals, loops, functions, objects, and graphical user interfaces. They include calculating sums, finding the largest of 3 numbers, validating ID numbers, calculating factorials, and creating a simple calculator application. The exercises demonstrate how to perform common programming tasks in Gambas.
This document contains 10 programming exercises in GAMBAS, a BASIC-like programming language. The exercises cover topics such as: basic math operations like addition and finding the maximum of 3 numbers; validating identification numbers; calculating factorials and Fibonacci sequences; using objects and classes; and creating basic graphical user interfaces. The exercises were completed by students Angela Solorzano and Raquel Zambrano at the Laica Eloy Alfaro University of Manabi, Ecuador.
This document contains summaries of multiple coding exercises completed by students Glenda Hurtado and David Saldaña at the Colegio Nacional Técnico "Arturo Borja". It includes exercises on basic math operations, functions, Fibonacci sequences, games, calculators, and trigonometric functions implemented in code. The exercises demonstrate skills in programming logic, variables, conditional statements, loops, and other basic programming concepts.
This document contains code snippets and descriptions for various programming tasks and examples in Gambas, including:
1) A timer program that counts seconds, minutes, and hours
2) A program to find the largest of three numbers
3) A program to calculate a verification digit for an ID number
4) Programs demonstrating functions, objects, graphics, and other programming concepts.
5) The document is authored by Kenny Loor and contains code examples in Spanish with comments and descriptions.
The document contains descriptions of 20 coding exercises in Spanish that demonstrate basic programming concepts like variables, conditionals, loops, functions, objects, and graphical user interfaces using the Gambas programming language. The exercises cover topics such as: printing text, mathematical operations, finding the maximum of 3 numbers, validating ID numbers, calculating factorials, Fibonacci sequences, creating classes for vehicles and living things, building a basic calculator app, and drawing shapes.
This document contains 10 programming exercises in GAMBAS, a BASIC-like programming language. The exercises cover basic concepts like variables, input/output, conditional statements, loops, functions, and objects. They include calculating sums and finding the maximum of 3 numbers, validating ID numbers, Fibonacci series, and simple graphical programs for a calculator and digital clock. The final exercises demonstrate creating objects for superheroes and living beings, as well as graphical programs for a bouncing circle, coloring application, and screensaver.
The document contains 19 coding exercises in Visual Basic using GAMBAS. The exercises cover basic concepts like printing text, performing mathematical operations, using conditional statements, creating functions, working with objects and classes, building graphical user interfaces, and creating simple games and applications like a calculator. Overall, the exercises demonstrate fundamental programming techniques in a step-by-step manner to teach Visual Basic syntax and programming logic.
This document contains 10 programming exercises in Gambas, a visual programming language. It includes exercises to calculate sums, find the largest of three numbers, validate ID numbers, calculate factorials, and export percentages. It also includes graphical user interface examples like a calculator application, clock, and random number guessing game. The exercises demonstrate basic programming concepts like variables, conditional statements, loops, and functions.
This document contains 10 programming exercises in Gambas, a visual programming language. The exercises cover basic concepts like variables, conditionals, loops, functions, objects, and graphical user interfaces. They include calculating sums, finding the largest of 3 numbers, validating ID numbers, calculating factorials, and creating a simple calculator application. The exercises demonstrate how to perform common programming tasks in Gambas.
This document contains 10 programming exercises in GAMBAS, a BASIC-like programming language. The exercises cover topics such as: basic math operations like addition and finding the maximum of 3 numbers; validating identification numbers; calculating factorials and Fibonacci sequences; using objects and classes; and creating basic graphical user interfaces. The exercises were completed by students Angela Solorzano and Raquel Zambrano at the Laica Eloy Alfaro University of Manabi, Ecuador.
This document contains summaries of multiple coding exercises completed by students Glenda Hurtado and David Saldaña at the Colegio Nacional Técnico "Arturo Borja". It includes exercises on basic math operations, functions, Fibonacci sequences, games, calculators, and trigonometric functions implemented in code. The exercises demonstrate skills in programming logic, variables, conditional statements, loops, and other basic programming concepts.
This document contains code snippets and descriptions for various programming tasks and examples in Gambas, including:
1) A timer program that counts seconds, minutes, and hours
2) A program to find the largest of three numbers
3) A program to calculate a verification digit for an ID number
4) Programs demonstrating functions, objects, graphics, and other programming concepts.
5) The document is authored by Kenny Loor and contains code examples in Spanish with comments and descriptions.
The document contains the code for a Gambas class that defines functions for a calculator application. It includes functions for each of the numeric buttons on a calculator that append the corresponding number to a text box. It also includes functions for basic math operations like addition, subtraction, multiplication, and division that perform the calculation when an operator button is clicked. Additional functions convert numbers between decimal, binary, octal, and hexadecimal representations and perform trigonometric functions.
This document contains code for several different programs written in Gambas including:
1. A billing program that allows a user to add items, quantities, and prices to a grid and calculates subtotals.
2. A basic calculator program that includes number buttons, arithmetic operators, and functions like square root.
3. A program that calculates the percentages of different products in a total.
4. A program that draws circles on a form and allows changing the radius size.
5. A screen saver program that draws random shapes on a form with changing colors.
The document contains code for several programs:
1. A billing program that allows adding items to a grid and calculates totals.
2. A calculator program with buttons for numbers and operations.
3. A program that calculates percentages of different products in a total.
4. A program that draws circles in an area and changes the radius on button clicks.
5. A screensaver program that draws random shapes on a timer in an area.
6. A digital clock program.
The document contains 18 programming exercises in Spanish with descriptions and code snippets. The exercises cover topics like:
1. Basic programming concepts like "Hello World" and variables.
2. Math operations like addition, finding the maximum of 3 numbers.
3. Functions, objects, and graphical user interfaces.
4. Exercises get more advanced covering things like Fibonacci series, vehicles as objects, and a basic calculator application.
Gambas is a free programming language derived from Basic. It distributes under the GNU GPL license. It allows creating forms with command buttons, text boxes, and many other controls and linking them to databases. Gambas is a simple programming language for free platforms (such as GNU/Linux and BSD). This example allows us to perform a subtraction. It takes numbers as input, performs the subtraction, and prints the result.
This document contains 15 programming exercises in Spanish using the GAMBAS programming language. It includes examples of printing text, finding the maximum of 3 numbers, calculating a verification digit for an ID number, calculating export percentages by product, defining and calling functions, generating Fibonacci sequences, creating object-oriented classes for superheroes and living beings, and graphical user interface examples including basic math operations, timers, menus, games, and shapes.
The document describes the code for a calculator program written in GAMBAS. It defines public variables to store calculator operations and values. It includes subroutines for each button click that append numbers or operate on values. The main operation subroutine uses a switch statement to perform the calculation based on the operation selected and stores the result.
This document describes a program created in Gambas 2.0 that generates a moving colored ellipse on the screen. When the user clicks the "INICIO" button, a timer is started that changes the color and position of the ellipse randomly every time it triggers. The user can click "PARAR" to stop the timer and movement of the ellipse. A second button closes the program window.
The document contains code for a calculator application written in Gambas. It defines various button click events that update the text in a text box with numbers or perform calculations. Functions are included to convert numbers to words, perform mathematical operations, and convert between number bases.
This document contains code for three different programs to solve the 2D heat equation using finite difference methods:
1. FTCS - Explicit forward time central space method. It takes input parameters, initializes the grid, applies boundary conditions, and runs a time stepping loop to march the solution forward in time.
2. FTCS Steady State - Similar to FTCS but uses residual to iterate the solution to steady state.
3. ADI - Alternating direction implicit method. It factorizes the equations and solves them in alternating x-y directions within each time step for increased stability over explicit methods. Includes a subroutine for tridiagonal matrix solution.
The document contains code for multiple programs including a screen protector program, calculator program, identification card validation program, lottery game program, and invoice program. The code defines variables and subroutines to handle events like button clicks and draws graphics.
The document contains code for multiple programs including a screen protector program, calculator program, identification card validation program, lottery game program, and invoice program. The code defines variables and subroutines to handle events like button clicks and draws graphics.
Um pescador australiano salvou uma fêmea de tubarão branco das redes de pesca. Desde então, o tubarão de 5 metros tem seguido o pescador por todo o lado, estabelecendo uma relação de confiança entre os dois. A história mostra a capacidade dos animais de reconhecimento e gratidão.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive functioning. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
Este documento contiene 40 preguntas relacionadas con temas de energía, tecnología e innovación en la institución educativa técnico industrial Simona Duque y el municipio de Marinilla. Las preguntas exploran opciones para mejorar el uso de energías renovables, ahorro de recursos, e implementación de nuevas tecnologías para beneficiar a la comunidad educativa y municipal.
La Unión Europea ha acordado un paquete de sanciones contra Rusia por su invasión de Ucrania. Las sanciones incluyen restricciones a las transacciones con bancos rusos clave y la prohibición de la venta de aviones y equipos a Rusia. Los líderes de la UE esperan que las sanciones aumenten la presión económica sobre Rusia y la disuadan de continuar su agresión contra Ucrania.
Este documento proporciona una lista de deudores de cuotas de mantenimiento del Condominio Los Inkas Golf para diciembre de 2014. Se incluye el nombre de cada deudor, el número de unidad, detalles sobre el vehículo y las cantidades adeudadas por cada año desde 2008 hasta 2014. En total, la deuda acumulada de todos los deudores asciende a 32797.80.
Este documento presenta conceptos sobre medidas de tendencia central y frecuencias. Explica qué son las frecuencias absoluta y relativa y cómo calcular la media aritmética y la moda. Luego, proporciona dos ejemplos de tablas de frecuencias con intervalos de datos y sus respectivas frecuencias para que los estudiantes calculen la media aritmética y la moda.
The document contains the code for a Gambas class that defines functions for a calculator application. It includes functions for each of the numeric buttons on a calculator that append the corresponding number to a text box. It also includes functions for basic math operations like addition, subtraction, multiplication, and division that perform the calculation when an operator button is clicked. Additional functions convert numbers between decimal, binary, octal, and hexadecimal representations and perform trigonometric functions.
This document contains code for several different programs written in Gambas including:
1. A billing program that allows a user to add items, quantities, and prices to a grid and calculates subtotals.
2. A basic calculator program that includes number buttons, arithmetic operators, and functions like square root.
3. A program that calculates the percentages of different products in a total.
4. A program that draws circles on a form and allows changing the radius size.
5. A screen saver program that draws random shapes on a form with changing colors.
The document contains code for several programs:
1. A billing program that allows adding items to a grid and calculates totals.
2. A calculator program with buttons for numbers and operations.
3. A program that calculates percentages of different products in a total.
4. A program that draws circles in an area and changes the radius on button clicks.
5. A screensaver program that draws random shapes on a timer in an area.
6. A digital clock program.
The document contains 18 programming exercises in Spanish with descriptions and code snippets. The exercises cover topics like:
1. Basic programming concepts like "Hello World" and variables.
2. Math operations like addition, finding the maximum of 3 numbers.
3. Functions, objects, and graphical user interfaces.
4. Exercises get more advanced covering things like Fibonacci series, vehicles as objects, and a basic calculator application.
Gambas is a free programming language derived from Basic. It distributes under the GNU GPL license. It allows creating forms with command buttons, text boxes, and many other controls and linking them to databases. Gambas is a simple programming language for free platforms (such as GNU/Linux and BSD). This example allows us to perform a subtraction. It takes numbers as input, performs the subtraction, and prints the result.
This document contains 15 programming exercises in Spanish using the GAMBAS programming language. It includes examples of printing text, finding the maximum of 3 numbers, calculating a verification digit for an ID number, calculating export percentages by product, defining and calling functions, generating Fibonacci sequences, creating object-oriented classes for superheroes and living beings, and graphical user interface examples including basic math operations, timers, menus, games, and shapes.
The document describes the code for a calculator program written in GAMBAS. It defines public variables to store calculator operations and values. It includes subroutines for each button click that append numbers or operate on values. The main operation subroutine uses a switch statement to perform the calculation based on the operation selected and stores the result.
This document describes a program created in Gambas 2.0 that generates a moving colored ellipse on the screen. When the user clicks the "INICIO" button, a timer is started that changes the color and position of the ellipse randomly every time it triggers. The user can click "PARAR" to stop the timer and movement of the ellipse. A second button closes the program window.
The document contains code for a calculator application written in Gambas. It defines various button click events that update the text in a text box with numbers or perform calculations. Functions are included to convert numbers to words, perform mathematical operations, and convert between number bases.
This document contains code for three different programs to solve the 2D heat equation using finite difference methods:
1. FTCS - Explicit forward time central space method. It takes input parameters, initializes the grid, applies boundary conditions, and runs a time stepping loop to march the solution forward in time.
2. FTCS Steady State - Similar to FTCS but uses residual to iterate the solution to steady state.
3. ADI - Alternating direction implicit method. It factorizes the equations and solves them in alternating x-y directions within each time step for increased stability over explicit methods. Includes a subroutine for tridiagonal matrix solution.
The document contains code for multiple programs including a screen protector program, calculator program, identification card validation program, lottery game program, and invoice program. The code defines variables and subroutines to handle events like button clicks and draws graphics.
The document contains code for multiple programs including a screen protector program, calculator program, identification card validation program, lottery game program, and invoice program. The code defines variables and subroutines to handle events like button clicks and draws graphics.
Um pescador australiano salvou uma fêmea de tubarão branco das redes de pesca. Desde então, o tubarão de 5 metros tem seguido o pescador por todo o lado, estabelecendo uma relação de confiança entre os dois. A história mostra a capacidade dos animais de reconhecimento e gratidão.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive functioning. Exercise causes chemical changes in the brain that may help protect against mental illness and improve symptoms.
Este documento contiene 40 preguntas relacionadas con temas de energía, tecnología e innovación en la institución educativa técnico industrial Simona Duque y el municipio de Marinilla. Las preguntas exploran opciones para mejorar el uso de energías renovables, ahorro de recursos, e implementación de nuevas tecnologías para beneficiar a la comunidad educativa y municipal.
La Unión Europea ha acordado un paquete de sanciones contra Rusia por su invasión de Ucrania. Las sanciones incluyen restricciones a las transacciones con bancos rusos clave y la prohibición de la venta de aviones y equipos a Rusia. Los líderes de la UE esperan que las sanciones aumenten la presión económica sobre Rusia y la disuadan de continuar su agresión contra Ucrania.
Este documento proporciona una lista de deudores de cuotas de mantenimiento del Condominio Los Inkas Golf para diciembre de 2014. Se incluye el nombre de cada deudor, el número de unidad, detalles sobre el vehículo y las cantidades adeudadas por cada año desde 2008 hasta 2014. En total, la deuda acumulada de todos los deudores asciende a 32797.80.
Este documento presenta conceptos sobre medidas de tendencia central y frecuencias. Explica qué son las frecuencias absoluta y relativa y cómo calcular la media aritmética y la moda. Luego, proporciona dos ejemplos de tablas de frecuencias con intervalos de datos y sus respectivas frecuencias para que los estudiantes calculen la media aritmética y la moda.
Este documento presenta un proyecto diseñado por un equipo de estudiantes para mejorar la movilidad de las personas con discapacidad a través del desarrollo de un vehículo de transporte. El equipo justifica el proyecto como una forma de ayudar a las personas con discapacidad y de bajos ingresos. El documento también incluye un análisis de costos y una discusión sobre los tipos de discapacidad.
El documento habla sobre los aviones. Explica que un avión es un medio de transporte aéreo con dos alas fijas y motores, y que puede ser civil o militar. Menciona que el primer hidroavión voló en 1911, y que George Cayley, pionero de la aerodinámica, ya volaba en 1803.
The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive functioning. Exercise boosts blood flow and levels of neurotransmitters and endorphins which elevate and stabilize mood.
O documento descreve uma pesquisa sobre como tornar as aulas de química mais significativas para os alunos, conectando os conceitos à vida real dos estudantes. A pesquisa será realizada em uma escola na periferia de São Paulo com 3000 alunos e envolverá três professores de química e uma turma do ensino médio noturno. A fundamentação teórica inclui a interdisciplinaridade, psicogenética de Wallon e os sentidos do sentido, e a metodologia será a observação participante.
El proyecto de tecnologia fabian ramires arbelaezIE Simona Duque
Este documento presenta información sobre un trabajo de investigación realizado por Anderson Fabián Ramírez Arbeláez para su profesor Vicente en el Colegio Institucional Educativa Técnico Industrial Simosa Duque. Explica que un trabajo de investigación busca profundizar los conocimientos adquiridos y desarrollar un espíritu crítico para enfrentar problemas de manera científica. También señala que se debe presentar una propuesta preliminar que demuestre el conocimiento del tema seleccionado y la intención de resolver un problema en particular
El marco teórico se refiere a las teorías que sustentan un trabajo de investigación. Proporciona orden y perspectiva para entender los aspectos seleccionados de la realidad empírica. Debe explicar el paradigma desde el cual se aborda el problema y el estado actual del conocimiento sobre el tema, incluyendo investigaciones y antecedentes previos. Tiene la función de orientar el estudio, ampliar el horizonte del problema de investigación y guiar el establecimiento de hipótesis.
El bullying es el maltrato físico y psicológico continuado que reciben los niños de otros con el objetivo de someterlos y asustarlos para obtener un resultado favorable o satisfacer la necesidad de agredir.
The document contains descriptions of 20 coding exercises in Spanish that demonstrate basic programming concepts like variables, conditionals, loops, functions, objects, and graphical user interfaces. The exercises cover topics such as: printing text, basic math operations, finding the maximum of 3 numbers, validating ID numbers, calculating factorials, Fibonacci sequences, creating and using classes, building a timer, random number games, and drawing shapes.
This document contains 10 programming exercises in Gambas, a visual programming language. The exercises cover basic concepts like variables, conditional statements, functions, objects and graphical user interfaces. Sample code is provided for tasks like calculating sums, finding the largest of three numbers, validating ID numbers, and creating a simple calculator application with buttons and a display screen. The exercises were created for a university-level programming course.
This document contains code snippets and descriptions in Spanish related to programming in Gambas. It includes examples of creating a timer, finding the largest of three numbers, calculating export percentages, Fibonacci series, object-oriented programming with classes like Superhero and Vehicle, and basic graphical drawing. The document was created by Kenny Loor on November 12, 2009 and contains code examples for learning and practicing programming concepts in Gambas.
Gambas is a free programming language derived from Basic. It distributes under the GNU GPL license. It allows creating forms with command buttons, text boxes, and many other controls and linking them to databases. Gambas is a simple programming language for free platforms (such as GNU/Linux and BSD). This example allows us to perform a subtraction. It takes numbers as input, performs the subtraction, and prints the result.
Gambas is a free programming language derived from Basic. It distributes under the GNU GPL license. It allows creating forms with command buttons, text boxes, and many other controls and linking them to databases. Gambas is a simple programming language for free platforms (such as GNU/Linux and BSD). This example allows us to perform a subtraction. It takes numbers as input, performs the subtraction, and prints the result.
The document contains multiple code blocks written in Visual Basic that declare variables, accept user input, perform calculations and logical operations, and output results. The code samples demonstrate basic programming concepts like declaring variables, conditional logic with IF/THEN statements, loops, functions, and selecting cases. Overall the document shows examples of common programming structures and techniques in Visual Basic.
This document contains multiple code examples written in a programming language. It includes examples of code for:
1) Declaring and assigning variables of different data types like strings, integers, and floats.
2) Using conditional statements like IF-THEN-ELSE and SELECT CASE.
3) Performing mathematical operations like addition, subtraction, multiplication and division.
4) Using loops like FOR-NEXT to iterate through arrays and add elements.
The code samples demonstrate basic programming concepts like variables, data types, conditional logic, mathematical operations, and loops.
The document contains code snippets for calculating the area of different shapes like triangles and circles. It also includes code to calculate the sum of the first 50 natural numbers, simple rule of three calculations, displaying age based on input and calculating the sum of the first 100 odd numbers. The code uses Visual Basic syntax with keywords like Private Sub, End Sub, Val, If/Then statements.
This document contains information about an IT assignment to calculate the surface area and volume of different geometric shapes. It includes:
1) An introduction that outlines the purpose of calculating surface area and volume for a cube, cylinder, cone, and sphere.
2) Details of the visual basic user interface that allows input of values and output of calculations for each shape.
3) The code used to calculate surface area and volume for each shape, including code for buttons, input boxes and output labels.
4) A conclusion that mentions the use of a timer to display the time and date on the main window.
The document contains code for multiple programs including a screen protector program, calculator program, identification card validation program, lottery game program, and invoice program. The code defines variables and subroutines to handle events like button clicks and draws graphics.
The document describes a calculator program created in GAMBAS. It defines variables to store numbers and operations, and includes subroutines for each button that appends numbers or performs calculations on the numbers stored in the variables when the equal button is pressed. The subroutines also convert numbers between binary, octal, and hexadecimal representations.
The document contains 12 code examples demonstrating various functions in VB.NET including:
1) Displaying a message when a button is clicked
2) Showing a message box on button click
3) Accepting input and displaying a sum
4) Performing math operations on input values
5) Checking if a number is positive, negative, or zero
6) Finding the maximum and minimum of three numbers
7) Calculating simple and compound interest
8) Creating a student marksheet
9) Building a digital clock using a timer
10) Displaying prime numbers between ranges
11) Collecting and displaying user information
12) Adding names between listboxes and removing selected names
1. Determine the output displayed when the button is clicked.Priva.docxcorbing9ttj
1. Determine the output displayed when the button is clicked.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
‘Triple a number
Dim num As Double = 5
lstOutput.Items.Add(Triple(num))
lstOutput.Items.Add (num)
End Sub
Function Triple(ByVal x As Double) As Double
Dim num As Double = 3
Return num * x
End Function
2. Determine the output displayed when the button is clicked.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim states, senators As Double
States = 50
Senators = 2
Senate(states * senators)
End Sub
Sub Senate (ByVal num as Double)
txtBox.Text = “the number of U.S. Senators is “ & num
End Sub
3. Find the errors.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim word As String, number As Double
word = “seven”
number = 7
Display (word, number)
End Sub
Sub Display(ByVal num As Double, ByVal term As String)
textOutput.Text = num & “ “ & term
End Sub
4. Rewrite the program so input, processing, and output are each performed by calls to Sub procedures.
Private Sub btnCompute_Click(...) Handles btnCompute.Click
‘Information about trees
Dim num As Integer = 7
Tree = “redwood”
ht = 362
lstBox.Items.Add(“The tallest “ & tree & “ tree in the U. S, is “ & ht & & “ feet.”)
tree = “pine”
ht = 223
lstBox.Items.Add(“The tallest “ & tree & “ tree in the U. S. is “ & ht & “ feet.”)
End Sub
5. Determine the output displayed when the button is clicked.
Private Sub btnDetermine_Click(...) Handles btnDetermine.Click
Dim word As String = “”
Dim num As Integer
GetFacts(word, num)
txtOutput.text = “The first “ & num & “ letters of “ & word & “ are “ & BegOfWord(word, num) & “.”
End Sub
Sub GetFacts(ByRef w As String, ByRef num As Integer)
w = InputBox(“enter a word: “)
n = CInt(InputBox(“Enter a number less than the length of the word: “))
End Sub
Function BefOfWiord(ByVal word As String, ByVal num As Integer) As String
Return word.Substring(0, num)
End Function
(Assume the two responses are Education and 3.)
6. Determine the output displayed when the button is clicked.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim price, markdown, salesTax, finalCost as Double
InputData(price, finalCost)
finalCost = CostOfItem(price, markdown, salesTax)
DisplayOutput(price, finalCost)
End Sub
Sub InputData (ByRef price As Double, ByRef markdown As Double, ByRef salesTax As Double)
Price = CDbl(InputBox(“Price of item: “)
Markdown = CDbl (InputBox(“Percentage discount: “))
salesTax = CDbl(InputBox(“Percentage state sales tax: “))
End Sub
Function CostOfItem(ByVal pr As Double, ByVal md As Double, ByVal st As Double) As Double
Dim reducedPrice, cost As Double
reducedPrice = pr – ((md/100) * pr)
cost = reducedPrice + ((st / 100) * reducedPrice)
Return cost
End Function
(Assume the three responses are 125, 20, and 6)
7. Identify the errors.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim w.
1. Determine the output displayed when the button is clicked. Priv.docxcorbing9ttj
1. Determine the output displayed when the button is clicked.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
‘Triple a number
Dim num As Double = 5
lstOutput.Items.Add(Triple(num))
lstOutput.Items.Add (num)
End Sub
Function Triple(ByVal x As Double) As Double
Dim num As Double = 3
Return num * x
End Function
2. Determine the output displayed when the button is clicked.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim states, senators As Double
States = 50
Senators = 2
Senate(states * senators)
End Sub
Sub Senate (ByVal num as Double)
txtBox.Text = “the number of U.S. Senators is “ & num
End Sub
3. Find the errors.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim word As String, number As Double
word = “seven”
number = 7
Display (word, number)
End Sub
Sub Display(ByVal num As Double, ByVal term As String)
textOutput.Text = num & “ “ & term
End Sub
4. Rewrite the program so input, processing, and output are each performed by calls to Sub procedures.
Private Sub btnCompute_Click(...) Handles btnCompute.Click
‘Information about trees
Dim num As Integer = 7
Tree = “redwood”
ht = 362
lstBox.Items.Add(“The tallest “ & tree & “ tree in the U. S, is “ & ht & & “ feet.”)
tree = “pine”
ht = 223
lstBox.Items.Add(“The tallest “ & tree & “ tree in the U. S. is “ & ht & “ feet.”)
End Sub
5. Determine the output displayed when the button is clicked.
Private Sub btnDetermine_Click(...) Handles btnDetermine.Click
Dim word As String = “”
Dim num As Integer
GetFacts(word, num)
txtOutput.text = “The first “ & num & “ letters of “ & word & “ are “ & BegOfWord(word, num) & “.”
End Sub
Sub GetFacts(ByRef w As String, ByRef num As Integer)
w = InputBox(“enter a word: “)
n = CInt(InputBox(“Enter a number less than the length of the word: “))
End Sub
Function BefOfWiord(ByVal word As String, ByVal num As Integer) As String
Return word.Substring(0, num)
End Function
(Assume the two responses are Education and 3.)
6. Determine the output displayed when the button is clicked.
Private Sub btnDisplay_Click(...) Handles btnDisplay.Click
Dim price, markdown, salesTax, finalCost as Double
InputData(price, finalCost)
finalCost = CostOfItem(price, markdown, salesTax)
DisplayOutput(price, finalCost)
End Sub
Sub InputData (ByRef price As Double, ByRef markdown As Double, ByRef salesTax As Double)
Price = CDbl(InputBox(“Price of item: “)
Markdown = CDbl (InputBox(“Percentage discount: “))
salesTax = CDbl(InputBox(“Percentage state sales tax: “))
End Sub
Function CostOfItem(ByVal pr As Double, ByVal md As Double, ByVal st As Double) As Double
Dim reducedPrice, cost As Double
reducedPrice = pr – ((md/100) * pr)
cost = reducedPrice + ((st / 100) * reducedPrice)
Return cost
End Function
(Assume the three responses are 125, 20, and 6)
7. Identify the errors.
P.
The document describes the code for a calculator program written in GAMBAS. It defines public variables to store operation numbers and values. It includes subroutines for each button click that append numbers or operate on values. The main operation subroutine uses a switch statement to perform calculations like addition, subtraction, multiplication, division, etc. based on the operation number stored. Additional subroutines convert values to binary, octal and hexadecimal formats.
This document contains code for multiple Visual Basic programs that perform tasks like calculating averages, factorials, sums of series, displaying shapes, and formatting text properties. The code includes event handler subroutines for buttons to run calculations or clear fields, and code to perform calculations, format outputs, and set properties.
The document describes a program that:
1) Takes input data for variables X and Y from the user.
2) Calculates the total, average, and sum of X and Y.
3) Displays the input data and calculation results.
The document discusses FoxPro code examples for programs to check if a number is even or odd. The first example checks if a single input number is even or odd. The second example adds a loop to check and report if 100 randomly input numbers are even or odd. Diagrams and pseudocode are provided to explain the logic and flow of the programs.
The document discusses FoxPro code examples for programs that check if a number is even or odd. The first example checks if a single input number is even or odd. The second example enhances this by adding a loop to check 100 randomly input numbers and report which are even or odd. Diagrams are included to illustrate the program flow.
The document describes a program to calculate the trace and norm of a matrix. It outlines an algorithm that begins by taking input for the order and elements of matrices A and B. It then calculates the sum of elements of each matrix to find their norms. If the matrices are square, it calculates the trace by summing the diagonal elements. The program displays the matrices, their sum, norms and traces.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
20 Comprehensive Checklist of Designing and Developing a WebsitePixlogix Infotech
Dive into the world of Website Designing and Developing with Pixlogix! Looking to create a stunning online presence? Look no further! Our comprehensive checklist covers everything you need to know to craft a website that stands out. From user-friendly design to seamless functionality, we've got you covered. Don't miss out on this invaluable resource! Check out our checklist now at Pixlogix and start your journey towards a captivating online presence today.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!SOFTTECHHUB
As the digital landscape continually evolves, operating systems play a critical role in shaping user experiences and productivity. The launch of Nitrux Linux 3.5.0 marks a significant milestone, offering a robust alternative to traditional systems such as Windows 11. This article delves into the essence of Nitrux Linux 3.5.0, exploring its unique features, advantages, and how it stands as a compelling choice for both casual users and tech enthusiasts.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIVladimir Iglovikov, Ph.D.
Presented by Vladimir Iglovikov:
- https://www.linkedin.com/in/iglovikov/
- https://x.com/viglovikov
- https://www.instagram.com/ternaus/
This presentation delves into the journey of Albumentations.ai, a highly successful open-source library for data augmentation.
Created out of a necessity for superior performance in Kaggle competitions, Albumentations has grown to become a widely used tool among data scientists and machine learning practitioners.
This case study covers various aspects, including:
People: The contributors and community that have supported Albumentations.
Metrics: The success indicators such as downloads, daily active users, GitHub stars, and financial contributions.
Challenges: The hurdles in monetizing open-source projects and measuring user engagement.
Development Practices: Best practices for creating, maintaining, and scaling open-source libraries, including code hygiene, CI/CD, and fast iteration.
Community Building: Strategies for making adoption easy, iterating quickly, and fostering a vibrant, engaged community.
Marketing: Both online and offline marketing tactics, focusing on real, impactful interactions and collaborations.
Mental Health: Maintaining balance and not feeling pressured by user demands.
Key insights include the importance of automation, making the adoption process seamless, and leveraging offline interactions for marketing. The presentation also emphasizes the need for continuous small improvements and building a friendly, inclusive community that contributes to the project's growth.
Vladimir Iglovikov brings his extensive experience as a Kaggle Grandmaster, ex-Staff ML Engineer at Lyft, sharing valuable lessons and practical advice for anyone looking to enhance the adoption of their open-source projects.
Explore more about Albumentations and join the community at:
GitHub: https://github.com/albumentations-team/albumentations
Website: https://albumentations.ai/
LinkedIn: https://www.linkedin.com/company/100504475
Twitter: https://x.com/albumentations
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
“An Outlook of the Ongoing and Future Relationship between Blockchain Technologies and Process-aware Information Systems.” Invited talk at the joint workshop on Blockchain for Information Systems (BC4IS) and Blockchain for Trusted Data Sharing (B4TDS), co-located with with the 36th International Conference on Advanced Information Systems Engineering (CAiSE), 3 June 2024, Limassol, Cyprus.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Programas Gambas
1. EJERCICIOS “GAMBAS”
(BAJO CONSOLA)
EJERCICIO 1
“HOLA MUNDO”
PUBLIC SUB Main()
PRINT "HOLA MUNDOn"
PRINT "HOLA MUNDO"
END
2. EJERCICIO 2
“SUMA”
PUBLIC SUB Main()
`Mi primera suma
DIM A AS Integer
DIM B AS Integer
DIM S AS Integer
A = 10
B = 20
S=A+B
PRINT "LA SUMA ES...:"
PRINT S
END
3. EJERCICIO 3
“MAYOR DE 3”
‘entre 3 números averiguar cuál es el mayor
‘el menor y el intermedio.
PUBLIC SUB Main()
DIM A, B, C AS Integer
A= 6
B = 10
C = 80
IF A > B AND A > C THEN
PRINT "MAYOR ES..: " & A
IF C > B THEN
PRINT "INTERMEDIO ES..: " & C
PRINT "MENOR ES..: " & B
ELSE
PRINT "INTERMEDIO ES..: " & B
PRINT "MENOR ES..: " & C
ENDIF
ELSE
IF B > C THEN
PRINT "MAYOR ES..: " & B
IF A > C THEN
PRINT "INTERMEDIO ES..: " & A
PRINT "MENOR ES..: " & C
ELSE
PRINT "INTERMEDIO ES..: " & C
PRINT "MENOR ES..: " & A
ENDIF
ELSE
PRINT "MAYOR ES..: " & C
IF A > B THEN
PRINT "INTERMEDIO ES..: " & A
PRINT "MENOR ES..: " & B
ELSE
PRINT "INTERMEDIO ES..: " & B
PRINT "MENOR ES..: " & A
ENDIF
ENDIF
ENDIF
END
4. EJERCICIO 4
“DIGITO AUTOVERIFICADOR”
PUBLIC SUB Main()
DIM B, C, D, E, F, G, H, I, J, K, W AS Integer
DIM A AS String
PRINT "INGRESE EL NUMERO DE CEDULA"
INPUT A
FOR B = 1 TO 9 STEP 1
C = Str(Mid(A, B, 1))
D = B MOD 2
IF D = 0 THEN
I=I+C
ELSE
H=C*2
IF H > 9 THEN
D = H MOD 10
E = Int(h / 10)
F=D+E
ELSE
F=H
ENDIF
G=G+F
ENDIF
5. NEXT
J=G+I
K = J MOD 10
W = 10 - K
PRINT "EL NUMERO VERIFICADOR DE LA CEDULA ES : "
PRINT W
END
EJERCICIO 5
“DE TODO UN POCO”
PUBLIC SUB Main()
DIM a AS Integer
DIM NOMBRE, C AS String
DIM F, I, X, T AS Integer
PRINT "INGRESE UN NÚMERO..:"
INPUT a
PRINT "INGRESE UN NOMBRE..:"
INPUT NOMBRE
PRINT "EL NÚMERO QUE INGRESE ES..", a
PRINT "EL NOMBRE ES..", NOMBRE
C = Mid(NOMBRE, 2, 2)
PRINT "EL CARACTER SELECCIONADO ES..:", C
F=1
FOR I = 1 TO 5
F=F*I
NEXT
PRINT "EL FACTORIAL DE 5 ES..: ", F
X=1
WHILE X <= 10
T=2*X
PRINT "2 X " & Str(X) & "=" & Str(T)
X=X+1
WEND
END
6. EJERCICIO 6
“EXPORTACION”
'El Ecuador exporta cafe, cacao y maíz en qq, se desea calcular el total de las exportaciones
'y el porcentaje de cada producto exportado, con los siguientes datos
'MAIZ 300, CAFE 400, CACAO 800
PUBLIC SUB Main()
DIM A AS Integer
DIM B AS Integer
DIM C AS Integer
DIM S AS Integer
DIM P1 AS Float
DIM P2 AS Float
DIM P3 AS Float
A = 300
B = 400
C = 800
S=A+B+ C
P1 = A * 100 / S
P2 = B * 100 / S
P3 = C * 100 / S
PRINT "El Total de las exportaciones es..: " & S
PRINT "El porcentaje de MAIZ es..: " & P1 & "%"
PRINT "El porcentaje de CAFE es..: " & P2 & "%"
7. PRINT "El porcentaje de CACAO es..: " & P3 & "%"
END
EJERCICIO 7
“FUNCIONES”
'PROCEDIMIENTO PRINCIPAL
PUBLIC SUB Main()
DIM a, b, h, z AS Integer
PRINT "Ingrese un número.:"
INPUT a
PRINT "Ingrese un número.:"
INPUT b
pintamedia(a, b)
h = 30
z = 70
pintamedia(h, z)
END
'PROCEDIMIENTO 1
PUBLIC SUB pintamedia(v1 AS Integer, v2 AS Integer) AS Integer
DIM s AS Integer
s = v1 + v2
PRINT "La suma es..: ", s
END
8. EJERCICIO 8
“PINTAMEDIA”
PUBLIC SUB Main()
DIM a, b AS Integer
PRINT "Ingrese un número.:"
INPUT a
PRINT "Ingrese un número.:"
INPUT b
'Llamada a función suma, resta, multiplicación y división
PRINT "La suma es..: ", suma(a, b)
PRINT "La resta es..: ", resta(a, b)
PRINT "La multiplicación es..: ", multiplicacion(a, b)
PRINT "La división es..: ", division(a, b)
END
'Función suma
PUBLIC SUB suma(v1 AS Integer, v2 AS Integer) AS Integer
DIM s AS Integer
s = v1 + v2
RETURN s
END
'Función resta
PUBLIC SUB resta(v1 AS Integer, v2 AS Integer) AS Integer
DIM r AS Integer
r = v1 - v2
RETURN r
END
'Función multiplicación
9. PUBLIC SUB multiplicacion(v1 AS Integer, v2 AS Integer) AS Integer
DIM m AS Integer
m = v1 * v2
RETURN m
END
'Función división
PUBLIC SUB division(v1 AS Integer, v2 AS Integer) AS Integer
DIM d AS Integer
d = v1 / v2
RETURN d
E
EJERCICIO 9
“MODULO FIBONACCI”
PUBLIC SUB Main()
'Serie de Fibonacci
DIM p, s, x, t AS Integer
DIM fibo AS String
p=0
s=1
fibo = Str(p) & " " & Str(s)
WHILE x < 5
t=p+s
fibo = fibo & " " & Str(t)
p=s
s=t
x=x+1
WEND
PRINT fibo
END
10. EJERCICIO 10
“OBJETO SUPERHEROE”
PRIVATE Heroe1 AS NEW SUPERHEROE
PRIVATE Heroe2 AS NEW SUPERHEROE
PUBLIC SUB Main()
Heroe1.Nombre = "Superman"
Heroe1.Actor = "Ramón Zambrano"
Heroe1.Habilidad = "Volar"
Heroe1.Imprime()
WITH Heroe2
.Nombre = "Batman"
.Actor = "Ochoa"
.Habilidad = "Visión Nocturna"
.Imprime
END WITH
11. END
EJERCICIO 11
“OBJETO SERES VIVOS”
INHERITS SeresVivos
PRIVATE Nombre AS String
PRIVATE Apellido AS String
PUBLIC SUB PoneNombre(cadena AS String)
Nombre = cadena
END
PUBLIC SUB PoneApellido(cadena AS String)
Apellido = cadena
END
PUBLIC FUNCTION Nombrecompleto() AS String
RETURN Nombre & " " & Apellido
END
12. EJERCICIO 12
“OBJETO VEHICULO”
PRIVATE marca AS String
PRIVATE modelo AS Integer
PRIVATE precio AS Integer
PRIVATE color AS String
PRIVATE placa AS String
PUBLIC SUB mar(marca1 AS String)
marca = marca1
END
PUBLIC SUB model(fecha AS String)
modelo = fecha
END
PUBLIC SUB pre(valor AS Integer)
precio = valor
END
PUBLIC SUB col(tinte AS String)
color = tinte
END
PUBLIC SUB pla(codigo AS String)
13. placa = codigo
END
PUBLIC FUNCTION marcaauto() AS String
RETURN marca
END
PUBLIC FUNCTION modeloauto() AS String
RETURN modelo
END
PUBLIC FUNCTION precioauto() AS Integer
RETURN precio
END
PUBLIC FUNCTION colorauto() AS String
RETURN color
END
PUBLIC FUNCTION placaauto() AS String
RETURN placa
END
EJERCICIOS “GAMBAS”
(APLICACIÓN GRAFICA)
EJERCICIO 13
“OPERACIONES BÁSICAS”
PUBLIC SUB Button1_Click()
suma.text = Val(num1.text) + Val(num2.text)
resta.text = num1.text - num2.text
multi.text = num1.text * num2.text
divi.text = num1.text / num2.text
END
PUBLIC SUB Button2_Click()
num1.text = ""
14. num2.text = ""
suma.text = ""
resta.text = ""
multi.text = ""
divi.text = ""
END
PUBLIC SUB Button3_Click()
ME.Close
END
EJERCICIO 14
“VENTANA”
PUBLIC SUB Main()
DIM vent AS window
vent = NEW window
vent.show()
END
15. EJERCICIO 15
“MENU”
PUBLIC SUB Timer1_Timer()
segundos.text = Val(segundos.Text) + 1
IF segundos.text = 59 THEN
minutos.text = Val(minutos.text) + 1
segundos.text = "0"
segundos.text = Val(segundos.text) + 1
ELSE
IF minutos.text = 59 THEN
horas.text = Val(horas.text) + 1
minutos.text = "0"
ENDIF
ENDIF
END
PUBLIC SUB Button1_Click()
IF Button1.text = "Iniciar" THEN
16. Timer1.enabled = TRUE
Button1.caption = "Parar"
ELSE
Timer1.Enabled = FALSE
Button1.text = "Iniciar"
ENDIF
END
PUBLIC SUB Button2_Click()
segundos.text = "0"
minutos.text = "0"
horas.text = "0"
END
EJERCICIO 16
“JUEGO”
PUBLIC SUB Button1_Click()
DIM n1, n2, n3 AS Integer
RANDOMIZE
n1 = Int(Rnd() * 10)
n2 = Int(Rnd() * 10)
n3 = Int(Rnd() * 10)
TextBox1.Text = n1
TextBox2.Text = n2
TextBox3.Text = n3
IF n1 = n2 AND n1 = n3 THEN
Message("GANASTES")
TextBox5.Text = TextBox4.Text * 2
ELSE
IF n1 = 7 AND n2 = 7 AND n3 = 7 THEN
Message("CONGRATULATIONS GANASTES EL PREMIO MAYOR")
TextBox5.Text = TextBox4.Text * 4
17. ENDIF
ENDIF
END
PUBLIC SUB Button2_Click()
ME.Close
END
EJERCICIO 17
“GRÁFICOS”
PUBLIC r AS Integer
PUBLIC posy AS Integer
PUBLIC posx AS Integer
PUBLIC al AS Integer
PUBLIC ba AS Integer
PUBLIC SUB Form_Open()
r = 20
END
PUBLIC SUB Button1_Click()
posy = area1.Height / 2
posx = area1.Width / 2
Draw.Begin(area1)
Draw.FillColor = Color.RGB(128, 255, 0)
18. Draw.FillStyle = Fill.Solid
Draw.Circle(posx, posy, r)
r = r + 20
'Draw.Ellipse(200, 200, 100, 50)
Draw.End
END
PUBLIC SUB Button3_Click()
ME.Close
END
PUBLIC SUB Button2_Click()
area1.Clear
posy = area1.Height / 2
posx = area1.Width / 2
Draw.Begin(area1)
Draw.FillColor = Color.RGB(128, 255, 0)
Draw.FillStyle = Fill.Solid
Draw.Circle(posx, posy, r)
r = r - 20
'Draw.Ellipse(200, 200, 100, 50)
Draw.End
END
PUBLIC SUB Button4_Click()
area1.Clear
Draw.Begin(area1)
posy = area1.Height / 2
posx = area1.Width / 2
Draw.FillColor = Color.RGB(255, 223, 117)
Draw.FillStyle = Fill.Solid
Draw.Rect(posx, posy, al, ba)
Draw.End
al = al + 10
ba = ba + 10
END
EJERCICIO 18
“PROTECTOR DE PANTALLA”
PUBLIC C1 AS Integer
PUBLIC C2 AS Integer
PUBLIC C AS Integer
PUBLIC r AS Integer
PUBLIC SUB Button1_Click()
IF Button1.Text = "Iniciar Fondo" THEN
Timer1.Enabled = TRUE
Button1.Caption = "Parar"
ELSE
Timer1.Enabled = FALSE
Button1.Text = "Iniciar Fondo"
ENDIF
END
PUBLIC SUB Button2_Click()
ME.Close
END
19. PUBLIC SUB Timer1_Timer()
C1 = Int(Rnd() * 700)
C2 = Int(Rnd() * 700)
C = Int(Rnd() * 15)
Draw.Begin(area1)
Draw.FillColor = Color.RGB((160 + c1), (2 + c2), (c1 + C2))
' coge los colores que se designen
Draw.FillStyle = Fill.Solid
Draw.Circle(C1, C2, C)
Draw.End
END
EJERCICIO 19
“CALCULADORA”
PUBLIC BAN AS Integer
PUBLIC OP1 AS Float
PUBLIC OP2 AS Float
PUBLIC SUB Button10_Click()
visor.text = visor.Text & "0"
END
PUBLIC SUB Button11_Click()
visor.text = visor.Text & "."
END
PUBLIC SUB Button7_Click()
visor.text = visor.Text & "1"
END
PUBLIC SUB Button8_Click()
visor.text = visor.Text & "2"
END
PUBLIC SUB Button9_Click()
visor.text = visor.Text & "3"
20. END
PUBLIC SUB Button4_Click()
visor.text = visor.Text & "4"
END
PUBLIC SUB Button5_Click()
visor.text = visor.Text & "5"
END
PUBLIC SUB Button6_Click()
visor.text = visor.Text & "6"
END
PUBLIC SUB Button1_Click()
visor.text = visor.Text & "7"
END
PUBLIC SUB Button2_Click()
visor.text = visor.Text & "8"
END
PUBLIC SUB Button3_Click()
visor.text = visor.Text & "9"
END
PUBLIC SUB Button12_Click()
ME.Close
END
PUBLIC SUB Button16_Click()
visor.text = ""
END
PUBLIC FUNCTION operacion(v1 AS Float, v2 AS Float, opera AS Integer) AS Float
DIM re AS Float
SELECT CASE opera
CASE 1
re = v1 + v2
CASE 2
re = v1 - v2
CASE 3
re = v1 * v2
CASE 4
re = v1 / v2
CASE 5
re = (v1 * v2) / 100
CASE 6
re = v1 ^ 2
CASE 7
re = v1 ^ 3
CASE 8
re = v1 ^ v2
CASE 9
re = 1 / v1
END SELECT
RETURN re
END
PUBLIC SUB Button13_Click()
BAN = 1
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.Clear
END
PUBLIC SUB Button14_Click()
BAN = 2
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
21. OP1 = 0
ENDIF
visor.Clear
END
PUBLIC SUB Button18_Click()
BAN = 3
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.Clear
END
PUBLIC SUB Button17_Click()
BAN = 4
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.Clear
END
PUBLIC SUB Button15_Click()
IF visor.text <> 0 THEN
OP2 = visor.Text
ELSE
OP2 = 0
ENDIF
visor.Text = operacion(OP1, OP2, BAN)
END
PUBLIC SUB Button19_Click()
BAN = 5
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.Clear
END
PUBLIC SUB Button20_Click()
BAN = 6
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.text = OP1
END
PUBLIC SUB Button21_Click()
DIM valor, x1, x2, i AS Integer
DIM cadena, cadena2 AS String
valor = visor.Text
WHILE valor > 0
x1 = valor MOD 2
x2 = Int(valor / 2)
cadena = cadena & Str(x1)
valor = x2
WEND
FOR i = Len(cadena) TO 1 STEP -1
cadena2 = cadena2 & (Mid(cadena, i, 1))
NEXT
visor.text = cadena2
END
22. PUBLIC SUB Button22_Click()
DIM valor, x1, x2, i AS Integer
DIM cadena, cadena2 AS String
valor = visor.Text
WHILE valor > 0
x1 = valor MOD 8
x2 = Int(valor / 8)
cadena = cadena & Str(x1)
valor = x2
WEND
FOR i = Len(cadena) TO 1 STEP -1
cadena2 = cadena2 & (Mid(cadena, i, 1))
NEXT
visor.text = cadena2
END
PUBLIC SUB Button23_Click()
DIM valor, x1, x2, i AS Integer
DIM cadena, cadena2 AS String
valor = visor.Text
WHILE valor > 0
x1 = valor MOD 16
x2 = Int(valor / 16)
IF x1 = 10 THEN
cadena = cadena & "A"
ELSE
IF x1 = 11 THEN
cadena = cadena & "B"
ELSE
IF x1 = 12 THEN
cadena = cadena & "C"
ELSE
IF x1 = 13 THEN
cadena = cadena & "D"
ELSE
IF x1 = 14 THEN
cadena = cadena & "E"
ELSE
IF x1 = 15 THEN
cadena = cadena & "F"
ELSE
cadena = cadena & Str(x1)
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
valor = x2
WEND
FOR i = Len(cadena) TO 1 STEP -1
cadena2 = cadena2 & (Mid(cadena, i, 1))
NEXT
visor.Text = cadena2
END
PUBLIC SUB Button24_Click()
BAN = 7
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.text = OP1
END
23. PUBLIC SUB Button27_Click()
BAN = 8
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.Clear
END
PUBLIC SUB Button25_Click()
BAN = 9
IF visor.text <> 0 THEN
OP1 = visor.Text
ELSE
OP1 = 0
ENDIF
visor.text = OP1
END
PUBLIC SUB Button26_Click()
DIM a, b AS Long
DIM valor AS Integer
valor = visor.Text
b=1
FOR a = valor TO 1 STEP -1
b=b*a
NEXT
visor.Text = b
END
PUBLIC SUB Button28_Click()
DIM r AS Float
r = Rad(visor.text)
visor.text = Sin(r)
END
PUBLIC SUB Button29_Click()
DIM r AS Float
r = Rad(visor.text)
visor.text = Cos(r)
END
PUBLIC SUB Button30_Click()
DIM r AS Float
r = Rad(visor.text)
visor.text = Tan(r)
END
EJERCICIO 20
“CONVIERTE NÚMERO A LETRAS”
PUBLIC FUNCTION EnLetras(numero AS String) AS String
DIM b, paso AS Integer
DIM expresion, entero, deci, flag AS String
flag = "N"
FOR paso = 1 TO Len(numero)
IF Mid(numero, paso, 1) = "." THEN
flag = "S"
ELSE
IF flag = "N" THEN
entero = entero & Mid(numero, paso, 1)
ELSE
deci = deci & Mid(numero, paso, 1)
END IF
END IF
NEXT
IF Len(deci) = 1 THEN
24. deci = deci & "0"
END IF
flag = "N"
IF Val(numero) >= -999999999 AND Val(numero) <= 999999999 THEN
FOR paso = Len(entero) TO 1 STEP -1
b = Len(entero) - (paso - 1)
SELECT CASE paso
CASE 3, 6, 9
SELECT CASE Mid(entero, b, 1)
CASE "1"
IF Mid(entero, b + 1, 1) = "0" AND Mid(entero, b + 2, 1) = "0" THEN
expresion = expresion & "cien "
ELSE
expresion = expresion & "ciento "
END IF
CASE "2"
expresion = expresion & "doscientos "
CASE "3"
expresion = expresion & "trescientos "
CASE "4"
expresion = expresion & "cuatrocientos "
CASE "5"
expresion = expresion & "quinientos "
CASE "6"
expresion = expresion & "seiscientos "
CASE "7"
expresion = expresion & "setecientos "
CASE "8"
expresion = expresion & "ochocientos "
CASE "9"
expresion = expresion & "novecientos "
END SELECT
CASE 2, 5, 8
SELECT CASE Mid(entero, b, 1)
CASE "1"
IF Mid(entero, b + 1, 1) = "0" THEN
flag = "S"
expresion = expresion & "diez "
END IF
IF Mid(entero, b + 1, 1) = "1" THEN
flag = "S"
expresion = expresion & "once "
END IF
IF Mid(entero, b + 1, 1) = "2" THEN
flag = "S"
expresion = expresion & "doce "
END IF
IF Mid(entero, b + 1, 1) = "3" THEN
flag = "S"
expresion = expresion & "trece "
END IF
IF Mid(entero, b + 1, 1) = "4" THEN
flag = "S"
expresion = expresion & "catorce "
END IF
IF Mid(entero, b + 1, 1) = "5" THEN
flag = "S"
expresion = expresion & "quince "
END IF
IF Mid(entero, b + 1, 1) > "5" THEN
25. flag = "N"
expresion = expresion & "dieci"
END IF
CASE "2"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "veinte "
flag = "S"
ELSE
expresion = expresion & "veinti"
flag = "N"
END IF
CASE "3"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "treinta "
flag = "S"
ELSE
expresion = expresion & "treinta y "
flag = "N"
END IF
CASE "4"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "cuarenta "
flag = "S"
ELSE
expresion = expresion & "cuarenta y "
flag = "N"
END IF
CASE "5"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "cincuenta "
flag = "S"
ELSE
expresion = expresion & "cincuenta y "
flag = "N"
END IF
CASE "6"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "sesenta "
flag = "S"
ELSE
expresion = expresion & "sesenta y "
flag = "N"
END IF
CASE "7"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "setenta "
flag = "S"
ELSE
expresion = expresion & "setenta y "
flag = "N"
END IF
CASE "8"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "ochenta "
flag = "S"
ELSE
expresion = expresion & "ochenta y "
26. flag = "N"
END IF
CASE "9"
IF Mid(entero, b + 1, 1) = "0" THEN
expresion = expresion & "noventa "
flag = "S"
ELSE
expresion = expresion & "noventa y "
flag = "N"
END IF
END SELECT
CASE 1, 4, 7
SELECT CASE Mid(entero, b, 1)
CASE "1"
IF flag = "N" THEN
IF paso = 1 THEN
expresion = expresion & "uno "
ELSE
expresion = expresion & "un "
END IF
END IF
CASE "2"
IF flag = "N" THEN
expresion = expresion & "dos "
END IF
CASE "3"
IF flag = "N" THEN
expresion = expresion & "tres "
END IF
CASE "4"
IF flag = "N" THEN
expresion = expresion & "cuatro "
END IF
CASE "5"
IF flag = "N" THEN
expresion = expresion & "cinco "
END IF
CASE "6"
IF flag = "N" THEN
expresion = expresion & "seis "
END IF
CASE "7"
IF flag = "N" THEN
expresion = expresion & "siete "
END IF
CASE "8"
IF flag = "N" THEN
expresion = expresion & "ocho "
END IF
CASE "9"
IF flag = "N" THEN
expresion = expresion & "nueve "
END IF
END SELECT
END SELECT
IF paso = 4 THEN
IF Mid(entero, 6, 1) <> "0" OR Mid(entero, 5, 1) <> "0" OR Mid(entero, 4, 1) <> "0" OR (Mid(entero,
6, 1) = "0" AND Mid(entero, 5, 1) = "0" AND Mid(entero, 4, 1) = "0" AND Len(entero) <= 6) THEN
expresion = expresion & "mil "
END IF
END IF
27. IF paso = 7 THEN
IF Len(entero) = 7 AND Mid(entero, 1, 1) = "1" THEN
expresion = expresion & "millón "
ELSE
expresion = expresion & "millones "
END IF
END IF
NEXT
IF deci <> "" THEN
IF Mid(entero, 1, 1) = "-" THEN
expresion = "menos " & expresion & "con " & deci & "/100"
ELSE
expresion = expresion & "con " & deci & "/100"
END IF
ELSE
IF Mid(entero, 1, 1) = "-" THEN
expresion = "menos " & expresion
ELSE
expresion = expresion
END IF
END IF
ELSE
expresion = ""
END IF
TextBox2.Text = expresion
END FUNCTION
PUBLIC SUB Button1_Click()
EnLetras(TextBox1.text)
END
PUBLIC SUB Button2_Click()
ME.Close
END
PUBLIC SUB Button3_Click()
TextBox1.Text = ""
TextBox2.Text = ""
END
EJERCICIO 21
“FACTURA”
PUBLIC r AS Integer
PUBLIC i AS Integer
PUBLIC m AS Integer
PUBLIC SUB Form_Open()
TextBox6.SetFocus
'Número de columnas
cuadro.Columns.Count = 5
'Número de filas
cuadro.Rows.Count = 10
cuadro.Columns[0].width = 50
cuadro.Columns[1].width = 200
cuadro.Columns[2].width = 80
cuadro.Columns[3].width = 50
cuadro.Columns[4].width = 80
cuadro[0, 0].text = "NUM"
28. cuadro[0, 1].text = "DETALLE"
cuadro[0, 2].text = "PRECIO.U"
cuadro[0, 3].text = "CANT"
cuadro[0, 4].text = "TOTAL A PAGAR"
r=0
i=0
END
PUBLIC SUB TextBox3_KeyPress()
IF Key.code = 65293 THEN
IF TextBox3.text = "" THEN
Message.Info("Ingrese Valor")
TextBox3.SetFocus
ELSE
i=i+1
r=r+1
TextBox4.text = i
cuadro[r, 0].text = Val(TextBox4.text)
cuadro[r, 1].text = (TextBox1.text)
cuadro[r, 2].text = TextBox2.text
cuadro[r, 3].text = TextBox3.text
'PRECIO TOTAL
TextBox5.Text = (TextBox2.text) * (TextBox3.text)
cuadro[r, 4].text = Val(TextBox5.text)
m = m + TextBox5.Text
TextBox1.text = ""
TextBox2.text = ""
TextBox3.text = ""
TextBox1.SetFocus
ENDIF
ENDIF
END
PUBLIC SUB Button2_Click()
TextBox6.Text = m
TextBox7.Text = (m * 7) / 100
TextBox8.Text = (((TextBox6.Text) - (TextBox7.Text) * 12) / 100)
TextBox9.Text = (TextBox6.Text) - (TextBox7.Text) + (TextBox8.Text)
END
PUBLIC SUB TextBox2_KeyPress()
IF Key.code = 65293 THEN
IF TextBox2.text = "" THEN
Message.Info("Ingrese Precio Unitario")
TextBox2.SetFocus
ELSE
TextBox3.Text.SetFocus
ENDIF
ENDIF
END
PUBLIC SUB TextBox1_KeyPress()
IF Key.code = 65293 THEN
IF TextBox1.text = "" THEN
Message.Info("Ingrese Detalle")
TextBox1.SetFocus
ELSE
TextBox2.Text.SetFocus
ENDIF
ENDIF
END
29. PUBLIC SUB Button1_Click()
TextBox4.text = ""
TextBox5.text = ""
TextBox6.text = ""
TextBox7.text = ""
TextBox8.text = ""
TextBox9.text = ""
END
PUBLIC SUB Button3_Click()
ME.Close
END