본문 바로가기

Python_Matter/Solve

Python Learn the basics Quiz 95

반응형

Q>

It was Sheldon's version and his best number.

(셀던의 버전과 최고의 번호였습니다.)

But you have the coding skills to prove that there is a better number, or prove Sheldon sheldon right.

(그러나 더 나은 숫자가 있다는 것을 증명할 수있는 코딩 기술을 가지고 있거나 Sheldon Sheldon이 맞다는 것을 증명할 수 있습니다.)

You can return any number, but use the code to prove your number is the best!

(번호를 반환 할 수 있지만 번호를 증명하는 코드를 사용하십시오!)

This mission is pretty simple to solve. You are given a function called "checkio" which will return any number (integer or float).

(이 임무는 매우 간단하게 해결할 수 있습니다. 임의의 숫자 (정수 또는 실수)를 반환하는 "checkio"라는 함수가 제공됩니다.)

Let's write an essay in python code which will explain why is your number is the best.

(파이썬 코드에 에세이를 작성하면 번호가 왜 가장 좋은지 설명 할 수 있습니다.)

Publishing the default solution will only earn you 0 points as the goal is to earn points through votes for your code essay.

(기본 솔루션을 게시하면 코드 에세이의 투표를 통해 점수를 얻는 것이 목표이므로 0 점만 얻게됩니다.)

 

Input: Nothing.

         (아무것도)

 

Output: A number as an integer or a float or a complex.

           (정수 또는 부동 소수점 또는 복합 숫자입니다.)

 

Example:

isinstance(checkio(), (int, float, complex))

 

How it is used: This mission revolves around code and math literacy.

                     (이 임무는 코드 및 수학 문맹 퇴치를 중심으로 이루어집니다.)

 

A>

# math : 수학 관련 함수 모듈
import math

# e : 자연상수
def checkio():
    return math.e

if __name__ == '__main__':
    # These "asserts" using only for self-checking and not necessary for auto-testing
    assert isinstance(checkio(), (int, float, complex))

 

O>

Your result: 2.718281828459045

checkio()

 

S>

https://py.checkio.org

반응형

'Python_Matter > Solve' 카테고리의 다른 글

Python Learn the basics Quiz 97  (0) 2019.06.24
Python Learn the basics Quiz 96  (0) 2019.06.24
Python Learn the basics Quiz 94  (0) 2019.06.24
Python Learn the basics Quiz 93  (0) 2019.06.23
Python Learn the basics Quiz 92  (0) 2019.06.22