Criando o efeito fadeOut com jquery.

Veja o exemplo em funcionamento.

Download do codigo.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>fadeOut com jquery</title>
    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
 
 
    <script type="text/javascript">
    $(document).ready(function() {
 
 
		$('#imagem').fadeOut(2000);
 
 
 
 
	});
 
 
	</script>
 
</head>
<body>
 
 
    <div id="teste">
 
		 <img id="imagem" src="imagens/foto.jpg" /> 
 
    </div>
 
</body>
</html>
Tags: , ,


Criando o efeito fadeIn com jquery.

Veja o exemplo em funcionamento.

Download do codigo.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>fadeIn com jquery</title>
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
 
<script type="text/javascript">
$(document).ready(function() {
 
$('#imagem').hide();
$('#imagem').fadeIn(2000);
 
});
 
</script>
 
</head>
<body>
 
<div id="teste">
 
<img id="imagem" src="imagens/foto.jpg" />
 
</div>
 
</body>
</html>
Tags: , ,


escreva um algoritmo que leia três notas, calcule e imprima a média aritmética

Continuando com a série de posts, onde vou postar alguns algoritimos resolvidos em linguagem C e também em python.

escreva um algoritmo que leia três notas, calcule e imprima a média aritmética.

Em C:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
 
int main(int argc, char **argv[]){
	float nota1,nota2,nota3;
	printf("digite a primeira nota: ");
	scanf("%f",&nota1);
	printf("digite a segunda nota: ");
	scanf("%f",&nota2);
	printf("digite a terceira nota: ");
	scanf("%f",&nota3);
 
	printf("a media aritmetica e: %f",(nota1+nota2+nota3)/3);
	return 0;
}

Em Python:

1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env python
 
def main():
    nota1 = input("digite a primeira nota: ")
    nota2 = input("digite a segunda nota: ")
    nota3 = input("digite a terceira nota: ")
    print "a media aritmetica e: ", (nota1+nota2+nota3)/3
 
if __name__ == "__main__":
    main()

qualquer dúvida ou se você quiser propor um algoritmo é só deixar um comentário!

abraço,
até…

Tags: , ,