Skip to content

Instantly share code, notes, and snippets.

View rashedulemon's full-sized avatar
❄️
Working from home

Md. Rashedul Islam Emon rashedulemon

❄️
Working from home
View GitHub Profile
@rashedulemon
rashedulemon / Method of String Formathing.py
Created June 25, 2018 06:22
Hear are some Method of Python String formating.
S1 = "Hello World"
print("Length of the String is", len(S1)) # To find the length of a String
List1 = ["Emon", "Bakkar", "Ehassan", "Anik", "Ahad", "Sibbir"]
print("After join the list:", ", ".join(List1)) # To join the String
S2 = "Hey this is Emon"
List2 = S2.split()
print("After Split the String:{}".format(List2)) # To Split a String
@rashedulemon
rashedulemon / Slice Operator.py
Last active June 24, 2018 17:04
This is a program which is show how slice orerator([] and [:]) work.
S1 = "Hello Python"
print(S1) # Prints complete string
print(S1[0]) # Prints first character of the string
print(S1[2:5]) # Prints character starting from 3rd t 5th
print(S1[2:]) # Prints string starting from 3rd character
print(S1 * 2) # Prints string two times
print(S1 + "Thanks") # Prints concatenated string
package input;
import java.util.Scanner;
public class Get_input {
@SuppressWarnings("resource")
public static void main(String[] args) {
Scanner scr = new Scanner(System.in);
System.out.println("Enter a number:");
int a = scr.nextInt();
System.out.println("Enter another number:");
int b = scr.nextInt();