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
#include <Joystick.h> | |
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_JOYSTICK, 12); | |
const int pins[12] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16}; | |
const int btnNr[12] = {2, 0, 7, 4, 5, 6, 8, 9, 1, 10, 11, 3}; // depends on order in which the buttons are connected to Arduino | |
void setup() { | |
for(int i=0; i<sizeof(pins)/sizeof(pins[0]); i++) { | |
pinMode(pins[i], INPUT_PULLUP); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>JS</title> | |
</head> | |
<body> | |
<script> | |
document.write('3<br>'); |
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 re | |
def readFile(path): | |
with open(path) as file: | |
return list(map(lambda x: x.strip().split('\t'), file.readlines()))[1:] | |
marki = readFile('marki.txt') | |
perfumy = readFile('perfumy.txt') | |
sklad = readFile('sklad.txt') |
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
from decimal import * | |
import sys | |
setcontext(Context(prec=3,capitals=0)) | |
inputValue = input("Enter n: ") # Enter the value of n | |
try: | |
integer = int(inputValue) # Convert a string to an integer | |
if(integer >= 0): # If the integer is non-negative | |
factorialValue = Decimal(1) # Set the initial value | |
for i in range(1,integer+1): # For every positive integer less than n | |
factorialValue *= i # Multiple the value by the integer |