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
# This implementation is based on Clear Code Tutorials | |
# Check this out: https://youtu.be/Qf3-aDXG8q4 | |
import pygame, sys, random | |
def ball_animation(): | |
global ball_speed_x, ball_speed_y, opponent_points, player_points, game_start, start_time | |
if ball.top <= 0 or ball.bottom >= SCREEN_HEIGHT: | |
ball_speed_y *= -1 |
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
import java.util.Scanner; | |
public class Uni6Exe05 { | |
private String mensagensEntrada[] = { | |
"Gosta de música sertaneja?", | |
"Gosta de futebol?", | |
"Gosta de seriados?", | |
"Gosta de redes sociais?", |
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
import java.util.Scanner; | |
public class Exemplo01 { | |
// Vetor de 10 posicoes para ler os numeros | |
private int numeros[] = new int[10]; | |
public Exemplo01() { | |
} |
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 find_lucky_value(value): | |
lucky_lst = [1, 3, 5, 7, 9] | |
# Nesta solução, usamos uma variável auxiliar | |
# Atribuímos False no inicio | |
has_value = False | |
for i in lucky_lst: | |
if value == i: | |
# Caso o valor esteja na lista, atribuímos True | |
has_value = True |