less than 1 minute read

📝문제

문제 이미지-불러오기 실패

✏️1번

  • 문제
      print("Hello, world!")
      print("Hello" , "world!")
      print(3)
      print(3.0)
      print(2+3)
      print(2.0 + 3.0)
      print("2" + "3")
      print(2*3)
      print(2 ** 3)
      print(2 / 3)
    
  • 결과
    Hello, world!
    Hello world
    3
    3.0
    5
    5.0
    23
    2 + 3 = 5
    6
    8
    0.6666666666666666
    


✏️2번

  • 문제
    def main():
      print("This program illustrates a chaotic function")
      x = eval(input("Enter a number between 0 and 1: "))
      for i in range(10):
          x = 3.9 * x * (1-x)
          print(x)
    main()
    
  • 결과
    This program illustrates a chaotic function
    Enter a number between 0 and 1: 0.5
    0.975
    0.09506250000000008
    0.33549992226562525
    0.8694649252590003
    0.44263310911310905
    0.962165255336889
    0.1419727793616139
    0.4750843861996143
    0.9725789275369049
    0.1040097132674683
    


✏️3번

  • 내 답안
    1. 무질서해 보이는 계산 결과 속에 질서있는 계산 과정이 있는 모습이 카오스이론(혼돈이론)과 비슷하기 때문에 이름을 chaos라고 붙인 것 같다.
    2. 실행 결과가 혼란스러움을 유발하기 때문이다.


✏️4번

  • 문제
    def main():
      print("This program illustrates a chaotic function")
      x = eval(input("Enter a number between 0 and 1: "))
      for i in range(20):
          x = 3.9 * x * (1-x)
          print(x)
    
  • 결과
    This program illustrates a chaotic function
    Enter a number between 0 and 1: 0.5
    0.975
    0.09506250000000008
    0.33549992226562525
    0.8694649252590003
    0.44263310911310905
    0.962165255336889
    0.1419727793616139
    0.4750843861996143
    0.9725789275369049
    0.1040097132674683
    0.36344760197260056
    0.90227842611257
    0.34387106474913476
    0.8799326467519814
    0.4120396173349332
    0.9448255872175185
    0.20330776813070028
    0.6316975062388134
    0.907357490716863
    0.3278335115517574