dist
DownloadTélécharger
Actions
Vote :
ScreenshotAperçu
Informations
Catégorie :Category: nCreator TI-Nspire
Auteur Author: admin123456
Type : Classeur 3.0.1
Page(s) : 1
Taille Size: 2.11 Ko KB
Mis en ligne Uploaded: 21/11/2024 - 20:21:57
Mis à jour Updated: 21/11/2024 - 23:02:43
Uploadeur Uploader: admin123456 (Profil)
Téléchargements Downloads: 3
Visibilité Visibility: Archive publique
Shortlink : http://ti-pla.net/a4333496
Type : Classeur 3.0.1
Page(s) : 1
Taille Size: 2.11 Ko KB
Mis en ligne Uploaded: 21/11/2024 - 20:21:57
Mis à jour Updated: 21/11/2024 - 23:02:43
Uploadeur Uploader: admin123456 (Profil)
Téléchargements Downloads: 3
Visibilité Visibility: Archive publique
Shortlink : http://ti-pla.net/a4333496
Description
Fichier Nspire généré sur TI-Planet.org.
Compatible OS 3.0 et ultérieurs.
<<
Define Dist() := Prgm // Display program information Disp "Dist v3" Disp "Coded by Gouda" Disp "" // Request input from the user for two coordinates as lists Request "Enter coordinates for point 1 as a list [x1, y1]: ", p1 Request "Enter coordinates for point 2 as a list [x2, y2]: ", p2 // Extract the x and y values from the input lists x1 := p1[1] // First coordinate (x1) y1 := p1[2] // First coordinate (y1) x2 := p2[1] // Second coordinate (x2) y2 := p2[2] // Second coordinate (y2) // Calculate the distance using the formula ((x2 - x1)^2 + (y2 - y1)^2) dx := x2 - x1 // Difference in x-coordinates dy := y2 - y1 // Difference in y-coordinates dx2 := dx^2 // Square of dx dy2 := dy^2 // Square of dy d := (dx2 + dy2) // Final distance calculation // Display the result Disp "The distance (d) = ", d // Ask the user if they want to see the steps (Y or N) Request "Do you want to see the steps? (Y/N): ", choice If choice = "Y" or choice = "y" Then // Display calculation steps without dx and dy Disp "Steps:" Disp "1. Calculate x2 - x1 = ", x2 - x1 Disp "2. Calculate y2 - y1 = ", y2 - y1 Disp "3. Square the difference in x: (x2 - x1)^2 = ", (x2 - x1)^2 Disp "4. Square the difference in y: (y2 - y1)^2 = ", (y2 - y1)^2 Disp "5. Add the squared differences: (x2 - x1)^2 + (y2 - y1)^2 = ", (x2 - x1)^2 + (y2 - y1)^2 Disp "6. Take the square root of the sum: ((x2 - x1)^2 + (y2 - y1)^2) = ", d ElseIf choice = "N" or choice = "n" Then Disp "Thank you for using Dist v3!" Else Disp "Invalid choice. Please enter 'Y' or 'N'." EndIf EndPrgm Made with nCreator - tiplanet.org
>>
Compatible OS 3.0 et ultérieurs.
<<
Define Dist() := Prgm // Display program information Disp "Dist v3" Disp "Coded by Gouda" Disp "" // Request input from the user for two coordinates as lists Request "Enter coordinates for point 1 as a list [x1, y1]: ", p1 Request "Enter coordinates for point 2 as a list [x2, y2]: ", p2 // Extract the x and y values from the input lists x1 := p1[1] // First coordinate (x1) y1 := p1[2] // First coordinate (y1) x2 := p2[1] // Second coordinate (x2) y2 := p2[2] // Second coordinate (y2) // Calculate the distance using the formula ((x2 - x1)^2 + (y2 - y1)^2) dx := x2 - x1 // Difference in x-coordinates dy := y2 - y1 // Difference in y-coordinates dx2 := dx^2 // Square of dx dy2 := dy^2 // Square of dy d := (dx2 + dy2) // Final distance calculation // Display the result Disp "The distance (d) = ", d // Ask the user if they want to see the steps (Y or N) Request "Do you want to see the steps? (Y/N): ", choice If choice = "Y" or choice = "y" Then // Display calculation steps without dx and dy Disp "Steps:" Disp "1. Calculate x2 - x1 = ", x2 - x1 Disp "2. Calculate y2 - y1 = ", y2 - y1 Disp "3. Square the difference in x: (x2 - x1)^2 = ", (x2 - x1)^2 Disp "4. Square the difference in y: (y2 - y1)^2 = ", (y2 - y1)^2 Disp "5. Add the squared differences: (x2 - x1)^2 + (y2 - y1)^2 = ", (x2 - x1)^2 + (y2 - y1)^2 Disp "6. Take the square root of the sum: ((x2 - x1)^2 + (y2 - y1)^2) = ", d ElseIf choice = "N" or choice = "n" Then Disp "Thank you for using Dist v3!" Else Disp "Invalid choice. Please enter 'Y' or 'N'." EndIf EndPrgm Made with nCreator - tiplanet.org
>>