發表文章

目前顯示的是 1月 29, 2019的文章

Aerodynamics

圖片
"Aerodynamic" redirects here. For other uses, see Aerodynamic (disambiguation). A vortex is created by the passage of an aircraft wing, revealed by smoke. Vortices are one of the many phenomena associated with the study of aerodynamics. Aerodynamics , from Greek ἀήρ aer (air) + δυναμική (dynamics), is the study of motion of air, particularly as interaction with a solid object, such as an airplane wing. It is a sub-field of fluid dynamics and gas dynamics, and many aspects of aerodynamics theory are common to these fields. The term aerodynamics is often used synonymously with gas dynamics, the difference being that "gas dynamics" applies to the study of the motion of all gases, and is not limited to air. The formal study of aerodynamics began in the modern sense in the eighteenth century, although observations of fundamental concepts such as aerodynamic drag were recorded much earlier. Most of the early efforts in aerodynamics wer...

Check user input against json list strings

圖片
0 I am developing a guess the answer from an image game for a project. The images and correct answers are stored in a list in a json file. The images are randomly rendered on the game page, where the player inputs their answer. I am trying to find a way to compare the users answers with the randomly generated image. Below are some of the items in the list { "players": [ "image_source": "static/img/portfolio/neymar.jpg", "answer": "Neymar" , "image_source": "static/img/portfolio/hugo_lloris.jpg", "answer": Lloris" , "image_source": "static/img/portfolio/lorenzo_insigne.jpg", "answer": "Insigne" The user enters the answer in a form on the html page. As the images are randomly generated this is not as straight forward as I hoped. My initial attempt uses Jinja and hidden forms: <img class="img-fluid" loop.index . src=" player.ima...