Skip to content

Instantly share code, notes, and snippets.

@situnamrit
situnamrit / Name.py
Created March 13, 2018 14:40
Print Your Name
i = input("Enter your name: \n\n")
length = len(i)
for x in range(0, length):
c = i[x]
c = c.upper()
if (c == "A"):
print(" ****** \n * * \n ****** \n * * \n * * \n\n")
elif (c == "B"):
@situnamrit
situnamrit / TicTacToe.py
Created January 22, 2018 08:46
Tic-Tac-Toe( A non graphical interface )
"""tictactoe game for 2 players made by AMRIT SAHANI"""
from __future__ import print_function
choices = []
for x in range (0, 9) :
choices.append(str(x + 1))
playerOneTurn = True
winner = False
import java.util.Scanner;
class BankAccount
{
String customerName;
String address;
int accountNumber;
double accountBalance;
boolean canWithdraw;
@situnamrit
situnamrit / Queue - LinkedList
Last active May 1, 2017 18:08
Queue-Dynamic ( Linked list )
import java.util.Scanner;
class Node{
{
int info;
Node next;
}
@situnamrit
situnamrit / Double Linked List
Last active May 1, 2017 06:53
Double Linked List
import java.util.*;
class Node{
int info;
Node next;
Node prev;
}
public class DLinkedList
{
@situnamrit
situnamrit / Single Linked List
Created April 29, 2017 14:43
Single Linked List
package list;
import java.util.Scanner;
class Node
{
int info;
Node next;
}
// Node Has two Parts
// 1. information
// 2. pointer value