Programming, oops concept, basic to advance coding, article related to computer Science like SQL database and about new technology related to computer Science.
Problem statement : Jadoo hates numbers, but he requires to print a special number "420" to recharge the equation of life. He asks your help to print the number but Since he hates numbers, he asks you to write the program such that there would not be any number in the code. Code: print( ord('z')+ ord('h')+ ord('a')+ ord('a')) Explanation: ord() function return Unicode of a symbol ord('a')=97, ord('h')=104 and ord('z')=122 Scream sort of output and code
Program to calculate permutation in python:- def fact(m): if(m==1 or m==0): return 1 else: return (m*fact(int(m)-1)) n=int(input("enter value of n:")) r=int(input("enter value of r:")) if(n>=r and r>=0): print("Permutation=",int(fact(n)/fact(n-r))) else: print("Invalid Input") Code Screenshot and output: output:
Comments
Post a Comment