This file contains hidden or 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
| n1 = float(input('digite sua primeira nota:')) | |
| n2 = float(input('digite sua segunda nota:')) | |
| resultado = (n1 + n2 ) /3 | |
| print('sua media é {:.2}'.format(resultado)) |
This file contains hidden or 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
| n = int(input('digite um numero:')) | |
| d = n*2 | |
| t = n * 3 | |
| r= n ** (1/2) | |
| print('o dobro do numero {} é {}\no triplo é {} \ne a raiz quadrada é {:.3}'.format(n,d,t,r)) | |
This file contains hidden or 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
| n = int(input('digite um numero:')) | |
| a = n - 1 | |
| s = n + 1 | |
| print('o antecessor do numero {} é {} e o sucessor é {}'.format(n,a,s)) | |
This file contains hidden or 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
| #Faça um programa que leia algo pelo teclado e mostre na tela o seu tipo primitivo e todas as informações possíveis sobre ele. | |
| a = input('digite algo :') | |
| print( | |
| 'tem espacos?',a.isspace(), | |
| '\nso tem numeroS?',a.isnumeric(), | |
| '\né alfabetico?',a.isalpha(), | |
| '\nele é alfanumerico?',a.isalnum(), | |
| '\nesta em maiuscula?',a.isupper()) |
This file contains hidden or 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
| #Faça um programa que leia algo pelo teclado e mostre na tela o seu tipo primitivo e todas as informações possíveis sobre ele. | |
| a = input('digite algo :') | |
| print( | |
| 'tem espacos?',a.isspace(), | |
| '\nso tem numeroS?',a.isnumeric(), | |
| '\né alfabetico?',a.isalpha(), | |
| '\nele é alfanumerico?',a.isalnum(), | |
| '\nesta em maiuscula?',a.isupper()) |
This file contains hidden or 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
| #Crie um programa que leia dois números e mostre a soma entre eles. | |
| a = int(input('digite um valor:')) | |
| b = int(input('digite outro valor:')) | |
| total = a+b | |
| print('a soma entre {}+{}={}'.format(a,b,total)) |
This file contains hidden or 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
| #Faça um programa que leia o nome de uma pessoa e mostre uma mensagem de boas-vindas. | |
| nome = input('digite seu nome:') | |
| print('seja bem-vindo(a) {}'.format(nome)) |
This file contains hidden or 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
| #crie um programa que escreva 'ola mundo' na tela | |
| print('olá, mundo') |