Skip to main content

Maths worksheet generator

 Continuing the discussion about maths games for children, I wrote a webpage which will generate worksheet in Arithmetic with 30 sums in simple arithmetic operations. You can select which operation. And you can select upper limit. The sums generated are random.

Here is how it looks like.


Hope it will be useful for teachers and parents. 

This was written using HTML and Javascript. Here is the HTML of the page


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
 
<style type="text/css">
  .box{
      margin-top: 50px;
      float:left;
      width:25%;
      padding: 10px;
      margin: 10px;
      font-size: 18px;
      background-color: #ccc;
      box-shadow :2px 2px #eeeeee;
      text-align: center;
</style>
<script type="text/javascript">
   function showQuestion() {
        var typeSel = document.getElementById("type").value
        var typeVal="??"
        switch(typeSel) {
          case  "Addition":typeVal = " + ";break
           case "Subtraction":typeVal = " - ";break      	
          case  "Multiplication":typeVal = " * ";break
          case  "Division":typeVal = " &#47 ";break;
        }
        var str = "";
        var inputrange = document.getElementById("range")
        var range = inputrange.value
        for(i=1;i<10;i++){ 
        var n1 = Math.floor(Math.random()*range);
        var n2 = Math.floor(Math.random()*range);
        if(n1<n2){
           t1 = n1;n1 = n2;n2 = t1         
        }
        str = str+n1 +typeVal+n2+"=<br><br>" ;
        }
        var qnBox = document.getElementById('qn1');
        qnBox.innerHTML =str;
        str = ""
         for(i=1;i<10;i++){ 
        var n1 = Math.floor(Math.random()*range);
        var n2 = Math.floor(Math.random()*range);
          if(n1<n2){
           t1 = n1;n1 = n2;n2 = t1         
        }
        str = str+n1 +typeVal+n2+"=<br><br>" ;
        }
          qnBox = document.getElementById('qn2');
        qnBox.innerHTML =str;
         str = ""
         for(i=1;i<10;i++){ 
        var n1 = Math.floor(Math.random()*range);
        var n2 = Math.floor(Math.random()*range);
          if(n1<n2){
           t1 = n1;n1 = n2;n2 = t1         
        }
        str = str+n1 +typeVal+n2+"=<br><br>" ;
        }
          qnBox = document.getElementById('qn3');
        qnBox.innerHTML =str;
        hideElements()        
         
   }
 
   function hideElements(){
        var qnFormat = document.getElementById("qnFormat")
        qnFormat.style.visibility ='hidden'
        
   }
</script>
</head>
<body>
<div id = "qnFormat">
<p  >
    Max.Number:<input   id="range">
    Type: <select id="type">
			<option value="Addition">Addition</option>
			<option value="Subtraction">Subtraction</option>
			<option value="Multiplication">Multiplication</option>
			<option value="Division">Division</option>    
    </select>
    <button name="start" type="button" onclick="showQuestion()">Create worksheet</button>
    </p></div>
     <div class = "box" id="qn1"></div>
     <div class = "box" id="qn2"></div>
     <div class = "box" id="qn3"></div>
   
</body>
</html>

I will be adding other pages with other worksheets in Maths soon.

Comments

Popular posts from this blog

ಧರ್ಮದ ಉದಯ

 ಇಷ್ಟು ವರ್ಷಗಳ ನಂತರ ನನಗೆ ಒಂದು ವಿಷಯ ಸ್ಪಷ್ಟವಾಗುತ್ತಾ ಇದೆ. ಧರ್ಮ-ದೇವರುಗಳ ಮೂಲ ಸಂಸ್ಥಾಪಕಿ ನಮ್ಮ-ನಿಮ್ಮ ಹಾಗೆ ವಯಸ್ಸಾದ ಮಹಿಳೆ. ಜೀಸಸ್ ಅಲ್ಲ, ಬುದ್ಧ ಅಲ್ಲ, ಮಹಮದ್ ಅಲ್ಲ, ಬಸವಣ್ಣನಲ್ಲ.  ನೀವು ಖಂಡಿತ ಒಪ್ಪಿಕೊಳ್ಳವದಿಲ್ಲ ತಾನೇ? ಸ್ವಲ್ಪ ವಿಶ್ಲೇಷಿಸಿ ನೋಡೋಣ. ಶಾಂತಮ್ಮ - ಹಾಗೆಂದು ಹೆಸರಿಡೋಣ ನಮ್ಮ ಸಂಸ್ಥಾಪಕಿಗೆ. ಅವಳಿಗೆ ಚಾಲೀಸು, ಪಚಾಸು ಎಲ್ಲ ಯಾವಾಗಲೋ ದಾಟಿದೆ. ಮಕ್ಕಳು-ಮೊಮ್ಮಕ್ಕಳೆಲ್ಲ ದೊಡ್ಡವರಾಗಿ ಅವರವರ ಗೂಡು ಸೇರಿದ್ದಾರೆ. ಮನೆಯಲ್ಲಿರವವರು ಅವಳು, ಗಂಡ. ಎಲ್ಲೋ ಒಂದಿಷ್ಟು ಜಿರಲೆ, ಹಲ್ಲಿ, ಇರುವೆಗಳು ಕಂಪನಿ ಕೊಡುತ್ತಿವೆ. ದಿನದಲ್ಲಿ ೩-೪ ಗಂಟೆ ಅಡಿಗೆ-ಕಸ-ಮುಸುರೆ ಮಾಡಿದ ನಂತರ ಅವಳ ಕೈ, ಮನಸ್ಸು ಎಲ್ಲಾ ಖಾಲಿ. ಟಿ.ವೀ., ಮೊಬೈಲ್ ನೋಡುತ್ತ, ಬೇಜಾರಾದರೆ ಗೋಡೆ ನೋಡುತ್ತ ಕುಳಿತು ಅಲ್ಲೇ ನಿದ್ದೆ ಬಂದಿದೆ. ಅರೆ ನಿದ್ರೆ, ಅರೆ ಕನಸಿನಲ್ಲಿ ಏನೋ ನೋಡುತ್ತಾಳೆ - ಅದು ನಿಜವಾದ ಕನಸಾ, ಅಥವಾ ನೋಡಿರುವ ಸಾವಿರಾರು ಸೀರಿಯಲ್ಲುಗಳ ಕಲಸುಮೇಲೋಗರವಾ ಗೊತ್ತಿಲ್ಲ. ಒಂದು ವ್ಯಕ್ತಿ ಕಾಣುತ್ತಾನೆ - ಅವನ ತಲೆಯ ಸುತ್ತ ಬೆಳಕು (ಅಷ್ಟು ಹೊತ್ತಿಗೆ ಒಂದರೆಕ್ಷಣ ದೊಡ್ಡ ಬಿಸಿಲು ಬಂತಾ ?). ಅವನು ಏನೋ ಹೇಳುತ್ತಿದ್ದಾನೆ. ಅವಳಿಗೆ ಸರಿಯಾಗಿ ಕೇಳಿಸುತ್ತಿಲ್ಲ. ಕೊನೆಯಲ್ಲಿ ಅಭಯ ಹಸ್ತ ತೋರಿಸಿ ಮಾಯವಾಗುತ್ತಾನೆ. ಪೊಲಿಟಿಶಿಯನ್ನಾ? ಎದ್ದ ಶಾಂತಮ್ಮ ಕನಸು ನೆನಪಿಸಿಕೊಳ್ಳಲು ನೋಡುತ್ತಾಳೆ - ಎಲ್ಲಾ ಅರೆಸ್ಪಷ್ಟ. ಏನಿರಬಹುದು - ಯಾ...

Dharmabheeru

 I wanted to call this post 'fear'. Then something told me I might have at least one more post with that title. And of course there it was.  So the title had to be changed to Dharmabheeru (dharma - religion, bheeru - fearful, timid) - god fearing - pious. You are afraid. But that is not a bad thing because you are afraid of God - that he may punish you if you commit a sin.   But I have a feeling that fear makes us religious, makes us believe in God, because we want to be protected by someone - and mom can't protect the adult us.   Drowning myself in Sanskrit works - particularly Ashtavakragita ,  I had to find some meaning of these words like atma, mukti, jnana. And I asked AI to find me some texts to understand history of religions. It gave me many options - most of which are not available. But the one I stuck to was "The natural history of religions".  Reading that text was not very easy - but 3 part series of podcasts by 'Philosophize this' ab...

A festival day

 If you read works of 19th century writers like Saki or Wodehouse, you will find the rich old aristocratic ladies who are bored with their lives and waiting for some event, any event in their life.  I am certainly living in 19th century. This century, particularly this decade has been really eventful, most of them not so good. But still as an older lady, who spends most of her life within walls of her home, I can say my life is almost non-eventful.  Yesterday was different. I decided that I will celebrate the festival in good, traditional manner. Which is hypocritical to say the least. I am not so much traditional, not very much religious either.  But bored, yes of course. So I practiced one particular rangoli for the festival. I tried to learn one or two songs for Ganesha - today's deity, not so successful. And I decided I will make the same 5 sweets for Ganesha puja.  This morning did not start well. The kitchen sink malfunctioned and decided it needed more at...