Skip to content

Instantly share code, notes, and snippets.

@nowsalt
nowsalt / computer_vision_5_kiso.md
Last active May 20, 2025 12:33
computer_vision_kiso_5.md

問題1

lst = [n * n for n in range(10)]

問題2

try: print(["apple", "banana", "cherry"][int(input("番号を入力: "))]) except ValueError: print("数字が入力されませんでした") except IndexError: print("範囲外の値が入力されました")
@nowsalt
nowsalt / computer_vision_5.py
Last active May 14, 2025 09:19
コンピュータビジョン5
'''
深さ優先探索(DFS)
幅優先探索(BFS)
9
/ \
2 4
/ \ / \
8 15 10 11
/ \ / \
3 17 5 23
@nowsalt
nowsalt / computer_vision_3.md
Last active May 7, 2025 14:41
コンピュータビジョン 3

問題1

(1) 引数  
(2) 戻り値  
(3) 引数列  
(4) キーワード引数  
(5) デフォルト引数  
(6) 可変長引数  
const int LEDPins[] = {1, 2, 3, 4, 5, 6, 7, 8};
const int bb[] = {
0b00000000,
0b00000000,
0b00000000,
0b00000000,
0b01111111,
0b01001001,
0b01001001,
/* グローバル変数の宣言 */
String bb[32]; /* 文字パターンの配列 */
int kind; /* 文字パターン配列bb の添え字 */
int km; /* 添え字の最大値 = 文字パターンのコマ数 */
long kct; /* ループカウンタ */
int sn1; /* センサの現在値 */
int sn2; /* センサの1回前の値 */
int Tperiod; /* 1周期の時間 (ms単位) */
/* LEDピンの配列 */
int latchPin = 5;
int clockPin = 3;
int dataPin = 4;
byte leds[2] = {0b10000000, 0b00000000};
int R1 = 9 ;
int G1 = 11;
int B1 = 10;
@nowsalt
nowsalt / Test
Created April 17, 2016 15:02
Test