June 2019 - Coder's point

## Triangle pattern

for(\$i=1;\$i<=5;\$i=\$i+1){ for(\$j=1;\$j<=5-\$i;\$j=\$j+1){ print" "; } while(\$k!=2*\$i-1){ print&q...
June 09, 2019

## Find area using subroutine

sub area { print "Enter the side "; \$side=<> ; return (\$side * \$side); } \$totalArea = area(...
June 09, 2019

## Strings operation in perl

my \$s = "CODERSPOINT"; print(length(\$s),"\n"); print("To lower case: "); print(lc(\$s),"\n...
June 09, 2019

## multiplication table

print "Enter the number:"; \$n = <> ; print"\nMultiplication Table Of \$n>>"; for(\$i=1;\$i<=10;...
June 09, 2019

## To demonstrate basic arithmetic operators

#!/usr/local/bin/perl print "Enter first number : "; \$a = <>; print "Enter second Number : "; \$b =...
June 09, 2019

## Prime number in perl

#!/usr/local/bin/perl print "Enter a number : "; \$num = <>; for(\$i=2;\$i<=\$num-1;\$i++) { if(\$num%\$...
June 09, 2019

## Even/Odd program in perl

#!/usr/local/bin/perl print "Enter a number"; \$num = <>; \$d=\$num%2; if(\$d==0) { print "Even numbe...
June 09, 2019

## Calculator

public class Calculator { static void main() { java.util.Scanner in = new java.util.Scanner(System.in); Syste...
June 01, 2019

## Leap Year

import java.util.Scanner; public class LeapYear { boolean isLeapYear(int y) { if(y%100==0) { if(y...
June 01, 2019

## Swapping of two numbers

import java.util.*; public class SwapNum { public static void main(String[]args) { Scanner in = new Scanner(System...
June 01, 2019

## Write a python program to implement GUI Frame Application using tkinter.

from tkinter import * top = Tk() top.geometry("200x100") frame = Frame(top) frame.pack() leftframe = Frame(top)...
June 01, 2019

## Write a python program to implement GUI Canvas Application using tkinter.

from tkinter import * master = Tk() w = Canvas(master, width=600, height=300, bg="orange") w.pack() w.create_recta...
June 01, 2019

## Check wether the String is Palindrome

str=input("Enter a string:- ") rev = str[::-1] if (rev==str): print("String is Palindrome.") else:...
June 01, 2019

## Display a Calendar

import calendar yy=int(input("Enter the year ")) mm=int(input("Enter the month ")) print (calendar.month(yy...
June 01, 2019

## Reverse a string

def rev(str): str=str[::-1] return str s = "Coders point" print ("The original string is : "...
June 01, 2019

## Program to calculate factorial of a number

n = 7 # uncomment to take input from the user #n = int(input("Enter a number: ")) fact = 1 # check if the number i...
June 01, 2019

## Program to add two matrices

X = [[1,2,3], [4,5,6], [7,8,9]] Y = [[10,11,12], [13,14,15], [16,17,18]] result = [[0,0,0], [0,...
June 01, 2019

## Program to find odd or even number

num = int(input("Enter a number: ")) if (num % 2) == 0: print("{0} is Even".format(num)) else: print...
June 01, 2019

## Program to Subtract two matrices

X = [[1,2,3], [4,5,6], [7,8,9]] Y = [[10,11,12], [13,14,15], [16,17,18]] result = [[0,0,0], [0,...
June 01, 2019

## Multiplication Table

num = int(input("Show the multiplication table of? ")) # using for loop to iterate multiplication 10 times for i in r...
June 01, 2019

## Armstrong Number

num = int(input("Enter a Number: ")) sum = 0 temp = num while temp > 0: digit = temp % 10 sum...
June 01, 2019

## Transpose of a matrix

X = [[1,2], [4,5], [7,8]] Result = [[0,0,0], [0,0,0]] # iterate through rows for i in range(len(X)): ...
June 01, 2019