This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def function1(): | |
print("Case 1 selected") | |
def function2(): | |
print("Case 2 selected") | |
def default(): | |
print("Value default") | |
def switch(case): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def function1(): | |
print("Case 1 selected") | |
def function2(): | |
print("Case 2 selected") | |
def default(): | |
print("Value default") | |
if __name__ == "__main__": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>App</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<script charset="utf-8" src="js/app.js"></script> | |
<link rel="stylesheet" href="css/app.css" /> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program volumes | |
implicit none | |
real, parameter :: pi = 3.14159265359 | |
real :: volume = 0.0 | |
integer :: raio | |
! iterando 10 vezes | |
open(unit=10, file='volumes.csv', status='unknown') | |
do raio = 1, 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!gfortran, gcc version 5.4.0 20160609 | |
program forca_magnetica | |
real :: B = 1.2 ! [mT] | |
real :: K = 5.3 ! [MeV] | |
real :: m = 1.6726219 * 1e-27 !1e-27 ! [Kg] | |
real :: q = 1.60217662 * 1e-19 ! [C] | |
real :: v = 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Atividade:https://my.pcloud.com/publink/show?code=XZn8R57ZwL98CRSObpY6l3Bb75cirVU9Ky5k | |
! | |
program work_3 | |
implicit none ! Adicionado por Hans | |
integer :: nc, nl, i, j | |
real,dimension(:,:), allocatable :: matriz | |
real,dimension(:), allocatable :: maxval1(:) | |
logical :: exis_arq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!Software para calcular o fatorial de nùmeros inteiros | |
!Desenvolvido por Denrlei Machado da Silva em 18/11/2017 | |
!Versão 2017 | |
program fatorial1 | |
implicit none | |
!Declaração das variáveis | |
real :: a, x | |
real :: fatorial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program matrizes | |
implicit none | |
!Declarar vars linhas e colunas i,j | |
integer :: i,j | |
integer, dimension(3,3) :: ID3 | |
integer, dimension(3,3) :: A !linha1 linha2 linha3 | |
integer, dimension(3,3) :: B = reshape((/3,1,5, 9,1,7, 2,1,0/),(/3,3/)) | |
integer, dimension(3,3) :: C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Codigo usado na aula do dia 13-11-2017 | |
program arrays | |
real :: a(2), b(2), c(2), soma, media | |
real :: x(3), y(3), maximo(1) | |
real :: pe, co | |
a = 0.; b = 0.; c = 0. | |
x = (/2,4,2/); y = (/1,3,2/) | |
a = b * c ! produto entre dois arrays |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program mainprog | |
implicit none | |
real :: a, b | |
a = 2.0 | |
b = 3.0 | |
Print *, "Antes de chamar troca" | |
Print *, "a = ", a | |
Print *, "b = ", b |
NewerOlder