Skip to content

Instantly share code, notes, and snippets.

View nyunerrr's full-sized avatar

IH nyunerrr

View GitHub Profile
@nyunerrr
nyunerrr / Hole_brothers_simulator.py
Last active January 25, 2020 07:50
This program is to simulate how many hole brothers would exist after sequence of banquets of "yarisa-".
import random as rand
import numpy as np
#name list
man_names_store = ["Daichi","Akito","Yamato","Aoi","So","Sora","Riku","Haruto","Kaito","Minato","Tasturu"]
yariman_names_store = ["めい","はな","りん","さくら","あかり","ゆうか","みお","かな","ひな","ゆな","ひかり"]
#input parameters
while True:
try:
n = input()
if(n == 1):
print("Yes")
else:
print("No")
@nyunerrr
nyunerrr / Python 演習問題15選 Q1.py
Last active May 22, 2020 10:30
Python 演習問題15選 Q1
n = input()
print(n)
n = input()
for i in range(4):
print(n)
for i in range(1,11):
if(i < 5):
print(i)
else:
print(i*2)
n = input()
print(str(n))
s = 0
for i in range(1,101):
s = s + i
print(s)
#答えは5050
def Q6(n):
return n*n
#2乗は他にもn**2でも表現できます。
def Q7(n):
if(n%2 != 0):
return "Yes"
else:
return "No"
#2で割り切れない数値は全て奇数です。
def Q8(n):
return int(1.12*n)
#税込価格は、税率がp、値段がnのとき、n(1+p)で表されます。