Skip to content

Instantly share code, notes, and snippets.

View leonardoFiedler's full-sized avatar
🏠
Working from home

Leonardo Fiedler leonardoFiedler

🏠
Working from home
View GitHub Profile
# 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
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?",
import java.util.Scanner;
public class Exemplo01 {
// Vetor de 10 posicoes para ler os numeros
private int numeros[] = new int[10];
public Exemplo01() {
}
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