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
| import React from 'react'; | |
| import './App.css'; | |
| class Person extends React.Component { | |
| // Define os estados | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| error: null, | |
| isLoaded: false, |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Ex22</title> | |
| </head> | |
| <body> | |
| <h1>Peso médio por faixa etária</h1> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Ex21</title> | |
| </head> | |
| <body> | |
| <h1>Fatorial</h1> |
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
| # "Legit" way (no input) [51 bytes]: | |
| >+++++[<+++++++++++++>-]>++++[<+++++++>-]<--[<.+>-] | |
| # "Not-so-legit" way (needs 'A' as input) [27 bytes]: | |
| ,.>>+++++[<+++++>-]<[<+.>-] | |
| # "Even-less-legit" way (needs 'A' and '[space]' as inputs) [15 bytes]: | |
| ,.>,----[<+.>-] |
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
| #include <iostream> | |
| unsigned char tape[30000] = {0}; | |
| unsigned char* ptr = tape; | |
| void interpret(char* input) | |
| { | |
| char current_char; | |
| unsigned int i, loop; | |
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
| def troco_minimo(troco): | |
| moedas_disponiveis = [100, 50, 25, 10, 5, 1] | |
| moedas_utilizadas = {} # Dicionario (moeda: quantidade) | |
| total = 0 | |
| for i in range(len(moedas_disponiveis)): | |
| num_moedas = troco // moedas_disponiveis[i] | |
| troco -= num_moedas * moedas_disponiveis[i] | |
| total += num_moedas |