Script of "Programming book starting from elementary and junior high school students"

"Programming book starting from elementary and junior high school students" memo

Write indents, etc. as written in the book. p.14

wa.html


<script>
 a=1;
 b=1;
 while(a<10000){
  a++;
  b=b+a;
 }
 document.write(b);
</script>

p.15

you.html


<script
 src="http://maps.google.com/maps/api/js">
</script>
<script>
 navigator.geolocation.getCurrentPosition(
 function(a){b=new
  google.maps.LatLng(a.coords.latitude,
  a.coords.longitude);new
  google.maps.Marker({position:b, map:new
  google.maps.Map(document.getElementById("c"),
  {zoom: 17, center:b})});
});
</script>
<div id="c" style="width:100%; height: 100%">
</div>

p.129 Figure 10-2

def bmicheck(shintyou, taijuu):
    bmi=taijuu/((shintyou/100)**2)
    message="BMI%.It is 1f."
    if bmi>=25:
        message=message+"I'm obese"
    print(message % bmi)

bmicheck(170,60)
bmicheck(170,80)

Recommended Posts

Script of "Programming book starting from elementary and junior high school students"
Code of "Programming picture book starting from 10 years old"
Difficulty teaching elementary school students real programming
Junior high school committee
From zero knowledge of Python to making AI in the first grade of junior high school
Programming beginner (junior high school student) Optimize the created algorithm
SIR model that even junior high school students can understand
Re: Competitive Programming Life Starting from Zero Chapter 1.2 "Python of Tears"
AI programming education started in elementary to junior high schools in the United States (introduction of free AI tools)