60945/sum-of-1-2-2-3-3-4-n-n-1
n = int(input("Enter the number:- ")) i = 1 ans1 = 0 while i <= n: # print(i, n) ans1 = ans1 + (i / (i + 1)) i = i + 1 print(round(ans1, 2))
x=1, x=2, x=3, x=4, x=5 READ MORE
Hey @abhijmr.143, you can print array integers ...READ MORE
Try using this question by list comprehension: a=[4,7,3,2,5,9] print([x for ...READ MORE
Hi. @Nandini, The above code will give you ...READ MORE
To create different arrays like random arrays: np.random.rand(3,4) ...READ MORE
Use numpy in the following manner: np.random.rand(3,4)*100 When you ...READ MORE
def is_prime(number): if number < 2: return False for i ...READ MORE
Don't worry! Python already comes in default ...READ MORE
Assumming a is a string. The Slice ...READ MORE
raw_input() is not used in Python 3. Use input() ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.