# (授業練習用) ## 授業でスライドにあるコードを練習する。HackMDに書いたコードをコピーして、実行した結果をスクリーンショットして貼り付けてください。 ## 例: :::info Code: ```python= r = float(input("Please input value r:")) r_Round = r * 2 * 3.14 r_Area = r * r * 3.14 print("The round:", r_Round) print("The area:", r_Area) ``` 結果: ![](https://i.imgur.com/u7n9gvs.png) ::: --- ## 1. :::info Code: ```python= x=int(input("INput a number")) if x%3==0 and x%5==0: print(x,"is a multiple of 3 and 5.") else: print(x,"is no a multple of 3 or 5.") ``` 結果: runfile('C:/Users/user/untitled0.py', wdir='C:/Users/user') INput a number3 3 is no a multple of 3 or 5. runfile('C:/Users/user/untitled0.py', wdir='C:/Users/user') INput a number45673 45673 is no a multple of 3 or 5. ::: --- ## 2. :::info Code: ```python= score=int(input("please input a score:")) if score <0 or score >100: print("Enter a number from 0 to 100") else: print("score: {}". format(score)) ``` 結果: runfile('C:/Users/user/untitled1.py', wdir='C:/Users/user') please input a score:99 score: 99 runfile('C:/Users/user/untitled1.py', wdir='C:/Users/user') please input a score:101 Enter a number from 0 to 100 ::: --- ## 3. :::info Code: ```python= ``` 結果: ::: --- ## 4. :::info Code: ```python= ``` 結果: ::: --- ## 5. :::info Code: ```python= ``` 結果: ::: --- ## 6. :::info Code: ```python= ``` 結果: ::: --- ## 7. :::info Code: ```python= ``` 結果: ::: --- ## 8. :::info Code: ```python= ``` 結果: ::: --- ## 9. :::info Code: ```python= ``` 結果: ::: --- ## 10. :::info Code: ```python= ``` 結果: ::: ---