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
| counter = 100 # A number | |
| miles = 1000.0 # A floating point | |
| name = "John" # A string (text) |
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
| <div class="code-area"> | |
| <span style="color: #777;font-style:italic;"> | |
| // 404 page not found. | |
| </span> | |
| <span> | |
| <span style="color:#d65562;"> | |
| if | |
| </span> | |
| (<span style="color:#4ca8ef;">!</span><span style="font-style: italic;color:#bdbdbd;">found</span>) | |
| { |
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
| <label for="inp" class="inp"> | |
| <input type="text" id="inp" placeholder=" "> | |
| <span class="label">Label</span> | |
| <span class="border"></span> | |
| </label> |
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
| # Interactive @ https://py3.codeskulptor.org/#user304_lfQquGbAhO_0.py | |
| import math | |
| def point_distance(x0: int, y0: int, x1: int, y1: int): | |
| result = math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2)) | |
| return result | |
| x1 = int(input("Value for x1: ")) |
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 interval_intersect(a, b, c, d): | |
| if (c <= b) and (a <= d) == False: | |
| return False | |
| else: | |
| return True | |
| def process(input: bool): | |
| if input == False: | |
| return "does not" | |
| else: |
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
| # Interactive @ https://repl.it/@ItsMMgamer/EminentNavajowhiteLanserver | |
| import random | |
| choices = ['rock', 'paper', 'scissors'] | |
| user_list = ['rock:scissors', 'scissors:paper', 'paper:rock', 'scissors:rock'] | |
| computer_choice = random.choice(choices) | |
| user_choice = str(input('Rock, Paper, Scissors?')) |
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
| int green = 2; | |
| int yellow = 3; | |
| int red = 4; | |
| int trigPin = 5; | |
| int echoPin = 6; | |
| // ECHO to RX0 | |
| long duration; | |
| int distance; |
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
| # Interactive @ http://www.codeskulptor.org/#user46_IEOQH6HNJcnPhI2_1.py | |
| # Implementation of classic arcade game Pong | |
| import simplegui | |
| import random | |
| # initialize globals - pos and vel encode vertical info for paddles | |
| WIDTH = 600 | |
| HEIGHT = 400 | |
| BALL_RADIUS = 20 |
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
| a = [5,9,19,0,3,-45,7,3,-20] | |
| b = [-19,2,3,-8,3.5,18.9, 24] | |
| def maximo(lista: list): | |
| maximo = lista[0] | |
| for i in lista: | |
| if maximo < i: | |
| maximo = i | |
| return maximo |
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
| a = [5,9,19,0,3,-45,7,3,-20] | |
| b = [-19,2,3,-8,3.5,18.9, 24] | |
| def media(lista: list): | |
| soma = 0 | |
| for i in lista: | |
| soma += i | |
| media = round(soma / len(lista), 1) | |
| return media |
OlderNewer