Python: Division | HackerRank
Division using __future__ module.
www.hackerrank.com
Goal

1. Read two integers each line.
2. print (a//b) in first line.
3. print (a/b) in second line.
Solution
Use input() function to read two integer values. But don't forget to convert input return value into integer value.
# Python: Division
if __name__ == '__main__':
a = int(input())
b = int(input())
print(a // b)
print(a / b)'software Engineering > (Python)HackerRank' 카테고리의 다른 글
| [Python] HackerRank - Write a function (0) | 2023.01.26 |
|---|---|
| [Python] HackerRank - Loops (0) | 2023.01.21 |
| [Python] HackerRank - Arithmetic Operators (0) | 2023.01.19 |
| [Python] HackerRank - Python If-Else (0) | 2023.01.19 |
| [Python] HackerRank - Say "Hello, World!" With Python (0) | 2023.01.19 |