온라인 퀴즈 생성
새로운 임베디드 기능을 사용하면 쉽게 양식을 작성하고 배포할 수 있습니다. 이러한 양식은 클라우드에 배치하고 코드와 데이터의 영구 저장을 원활하게 제공하고, 클라우드 컴퓨팅 및 액티브 문서, API, 응용 프로그램 등을 통한 즉각적인 외부 배치를 제공합니다. 여기에서는 이러한 기능에 대해 각각 도시와 유명한 영화에 대해 사용자에게 쿼리를 촉구하는 두가지 "퀴즈"의 개발 및 배포를 통해 설명하고 있습니다.
미국의 대도시에 대한 퀴즈를 클라우드에 작성합니다.
In[1]:=

CloudDeploy[
 FormFunction[{"city", 
    "How many of the 10 most populous US cities can you name?"} -> 
   RepeatingElement[
    Restricted[
     "City", {"Country" -> Entity["Country", "UnitedStates"], 
      "Population" -> TakeLargest[10]}], {1, {1, 10}}], 
  GeoListPlot[{#city, 
     Complement[
      EntityList@
       Entity["City", {"Country" -> Entity["Country", "UnitedStates"],
          "Population" -> TakeLargest[10]}], #city]}, 
    GeoLabels -> True, PlotLegends -> {"OK", "Missed"}] &, "PNG"]]form을 사용하여 인터렉트합니다.

필드 중 하나가 미국의 십대 대도시에 속하지 않는 경우, 이 양식은 실패 메시지를 표시합니다.


영화에 대한 퀴즈를 클라우드에 작성합니다.
In[2]:=

CloudDeploy[
 FormFunction[{"movies", 
    "How many of the 10 top grossing movies by Steven Spielberg can \
you name?"} -> 
   RepeatingElement[
    Restricted[
     "Movie", {"Director" -> 
       Entity["Person", "StevenSpielberg::76z25"],
      "DomesticBoxOfficeGross" -> TakeLargest[10]}], {1, {1, 10}}],
  With[{images = 
      EntityValue[
       EntityClass[
        "Movie", {"Director" -> 
          Entity["Person", "StevenSpielberg::76z25"],
         "DomesticBoxOfficeGross" -> TakeLargest[10]}], "Image", 
       "EntityAssociation"]},
    Grid[{
      {"you guessed", Length[#movies], 
       ImageCollage[Values[KeyTake[images, #movies]]]}, {"you missed",
        10 - Length[#movies], 
       ImageCollage[Values[KeyDrop[images, #movies]]]}
      }, Frame -> All, Alignment -> Left]] &]]page를 열고 퀴즈에 도전합니다.




























 
  
  
  
  
  
  
 