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 on_button_pressed_a(): | |
global speed | |
speed += 10 | |
input.on_button_pressed(Button.A, on_button_pressed_a) | |
def on_button_pressed_ab(): | |
global speed | |
speed = 250 | |
input.on_button_pressed(Button.AB, on_button_pressed_ab) |
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
come_stai = function(){ | |
var = readline(prompt = "Da 1 a 10, come ti senti? ") | |
if (var == 10) {print (" Come un Dio ")} else | |
if (var %in% seq(6,9,1)) {print (" Potrebbe andare peggio ")} else | |
if (var %in% seq(2,5,1)) {print (" Senti un medico ")} else | |
if (var < 2) {print (" Scappa finché sei in tempo! ")} | |
} |
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
Sub TimeMeter() | |
'supermacro che esegue di fila le macro TIMEMETER | |
TIMEMETER1 | |
TIMEMETER2 | |
TIMEMETER3 | |
TIMEMETER4 | |
TIMEMETER5 | |
End Sub |
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
live_loop :beats do | |
use_synth :dark_ambience | |
play :C | |
sample :bass_woodsy_c, pan: -1 | |
sleep 0.5 | |
play :G | |
sample :bass_trance_c , pan: 1 | |
sleep 0.5 | |
with_fx :reverb do | |
play_chord [70, 75, 82] |
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
print() | |
risultato = "" | |
risposta = input("scrivi una parola: ") | |
n = 0 | |
lista_testo = ["a", "b", "c", "d", "e", "f", "g", "h", "k", "j", | |
"i", "l", "m", "n", "o", "p", "q", "r", "s", "t", | |
"u", "v", "w", "x", "y", "z"] | |
for n in range(len(lista_testo)): | |
if (lista_testo[n] in risposta): | |
risultato = (risultato + lista_testo[n]) |
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
# Python Program to find the factors of a number | |
# This function computes the factor of the argument passed | |
def print_factors(x): | |
old_i = 1 | |
print("The factors of",x,"are:") | |
print(1) | |
for i in range(2, x + 1): | |
if x % i == 0: |
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 time | |
global più_o_meno, n, pi_greco | |
più_o_meno = 0 | |
n = 1 | |
pi_greco = 4 / n | |
start_time = time.time() | |
for index in range(100000000): | |
n += 2 | |
if più_o_meno == 0: |
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
/* | |
Rui Santos | |
Complete project details at Complete project details at https://RandomNerdTutorials.com/esp8266-nodemcu-http-get-open-weather-map-thingspeak-arduino/ | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files. | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. | |
*/ |
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
""" | |
trasmettitore micro:bit | |
""" | |
radio.set_group(1) | |
radio.set_transmit_power(1) | |
def on_forever(): | |
radio.send_string("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
""" | |
Password protected door by micro:bit | |
""" | |
def on_button_pressed_a(): | |
global tentativo, nuovapassword | |
if stato == "inserimento": | |
tentativo = "" + tentativo + "A" |
NewerOlder