Eye and Identity

Sort by

recency

|

307 Discussions

|

  • + 0 comments

    Here is HackerRank Eye and Identity in Python solution - https://programmingoneonone.com/hackerrank-eye-and-identity-problem-solution-in-python.html

  • + 0 comments

    This was a fun little task with NumPy! I used numpy.eye for creating the diagonal just like the sample showed, and it worked perfectly. Reminds me of how I recently had to check my Emirates ID progress—thankfully, I could just checkidstatusonline through the UAE government site. It was as seamless as running a Python script—no registrations, no logins, just straight to the result.

  • + 0 comments
    import numpy as np
    
    np.set_printoptions(legacy='1.13')
    
    n, m = map(int, input().split())
    
    print(np.eye(n, m))
    
  • + 0 comments

    import numpy as np

    np.set_printoptions(legacy='1.13') n = input() l1 = list(map(int,n.split(' '))) print(np.eye(l1[0],l1[1]))

  • + 0 comments

    For Python3 Platform

    import numpy
    
    numpy.set_printoptions(legacy='1.13')
    
    N, M = map(int, input().split())
    
    print(numpy.eye(N, M))