loop


3.8
10
Awgiedawgie 440220 points

                                    1234567891011121314151617181920import datetime

def parse_expenses(expenses_string):
    """Parse the list of expenses and return the list of triples (date, value, currency).
    Ignore lin

3.8 (10 Votes)
0
4
6
Krish 100200 points

                                     1.0.0 

4 (6 Votes)
0
4
6
Awgiedawgie 440220 points

                                    ivDCugkzcgyuxzhjchxhczcvbcbbcbv
DsdSDFdfdSF
DFSFSD
CHGGhhskfiv
	edfgzhbvbcd
  fsdf

4 (6 Votes)
0
3.5
2
Phoenix Logan 186125 points

                                     size = 8; 
    
    grid = ""
    
    for (var i = 1; i <= size; i++) {
      for (var j = 1; j <= size; j++) {
        if (i % 2 === 0) {
        	grid+= "# "
        } else {
        	grid+= " #"
        }
      }
      grid+= "\n"
    }
    
    
    console.log(grid)

3.5 (2 Votes)
0
4
2
Awgiedawgie 440220 points

                                    
	To investigate the implementation of integer multiplication in hardware.

4 (2 Votes)
0
0
0
Phoenix Logan 186125 points

                                    >>> fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana']
>>> fruits.count('apple')
2
>>> fruits.count('tangerine')
0
>>> fruits.index('banana')
3
>>> fruits.index('banana', 4)  # Find next banana starting a position 4
6
>>> fruits.reverse()
>>> fruits
['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange']
>>> fruits.append('grape')
>>> fruits
['banana', 'apple', 'kiwi', 'banana', 'pear', 'apple', 'orange', 'grape']
>>> fruits.sort()
>>> fruits
['apple', 'apple', 'banana', 'banana', 'grape', 'kiwi', 'orange', 'pear']
>>> fruits.pop()
'pear'

0
0
0
0
Awgiedawgie 440220 points

                                    var ctx = canvas.getContext('2d'),
    img = new Image;

img.onload = draw;
img.src = "http://i.stack.imgur.com/UFBxY.png";

function draw() {

  var dArr = [-1,-1, 0,-1, 1,-1, -1,0, 1,0, -1,1, 0,1, 1,1], // offset array
      s = 2,  // thickness scale
      i = 0,  // iterator
      x = 5,  // final position
      y = 5;
  
  // draw images at offsets from the array scaled by s
  for(; i < dArr.length; i += 2)
    ctx.drawImage(img, x + dArr[i]*s, y + dArr[i+1]*s);
  
  // fill with color
  ctx.globalCompositeOperation = "source-in";
  ctx.fillStyle = "green";
  ctx.fillRect(0,0,canvas.width, canvas.height);
  
  // draw original image in normal mode
  ctx.globalCompositeOperation = "source-over";
  ctx.drawImage(img, x, y);
}

0
0
4
2
A-312 69370 points

                                     0.1.0 

4 (2 Votes)
0
3.56
9
Awgiedawgie 440220 points

                                    OAS3

3.56 (9 Votes)
0
Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source