Skip to content

Commit

Permalink
Merge pull request #10 from rakshitmehra/master
Browse files Browse the repository at this point in the history
Adding ATM and ReportCard Program, Adding Pyhton Programs And adding To-Do Web Application
  • Loading branch information
Rakeshgombi authored Oct 3, 2022
2 parents 56b4fe5 + 5b5f002 commit bd44b17
Show file tree
Hide file tree
Showing 28 changed files with 522 additions and 0 deletions.
66 changes: 66 additions & 0 deletions C++/ATM And ReportCard/atm1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#include <iostream>
using namespace std;

void showMenu() {
cout<<"*********Menu************" << endl;
cout<<"1. Check Balance" << endl;
cout<<"2. Deposite" << endl;
cout<<"3. Withdrawl" << endl;
cout<<"4. Money Transfer" << endl;
cout<<"5. Exit" << endl;
cout<<"**************************"<< endl;
}

int main ()
{
//check balance, deposite, withdraw, show menu,transfer money
int option;
double balance = 50000;
double pin = 2003;
do{
showMenu();
cout<<"option:";
cin>>option;
system("cls");

switch(option){
case 1: cout<<"Balance is: " << balance << "$"<< endl; break;
case 2: cout<<"Enter your Pin-: "
int pin;
cin>>pin;
cout<<"Deposite Amount:";
double depositeAmount;
cin>> depositeAmount;
balance+= depositeAmount;
cout<<"Total Amount:"<< balance <<endl;
break;
case 3: cout<<"Widthdraw Amount:";
double withdrawAmount;
cin>> withdrawAmount;
if (withdrawAmount <= balance)
balance-= withdrawAmount;
else
cout<< "Not Enough Money" << endl;
cout<<"Total Amount:"<< balance <<endl;
break;
case 4: cout<<"Transfer Amount:";
double transferAmount;
cin>> transferAmount;
if (transferAmount <= balance)
balance-= transferAmount;
else
cout<< "Not Enough Money" << endl;
cout<< "Enter Account Number";
double accountnumber;
cin>> accountnumber;
cout<<"Transfer Successfully" << endl;
cout<<"Total Amount:"<< balance <<endl;
break;
}
cout<< "******Thankyou Soo Much, Have A Nice Day********"<< endl;

} while(option!=5);

system("pause>0");

}
Binary file added C++/ATM And ReportCard/atm1.exe
Binary file not shown.
40 changes: 40 additions & 0 deletions C++/ATM And ReportCard/report.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include<iostream>
using namespace std;

int main()

{
cout<<"Hello, Welcome Here"<<endl;
cout<<"Please Enter Your Marks"<<endl;
int maths,phy,chem,bio,english,music,fine,sum;
float per;
cout<<"Maths=";
cin>>maths;

cout<<"Physics=";
cin>>phy;

cout<<"Chemistry=";
cin>>chem;

cout<<"Biology=";
cin>>bio;

cout<<"English=";
cin>>english;

cout<<"Music=";
cin>>music;

cout<<"Fine Arts= ";
cin>>fine;

sum= maths+phy+chem+bio+english+music+fine;
cout<<"\nTotal Marks="<<sum<< endl;
if(sum >=201)
cout<<"Congratulations, you have cleared the exam";
else
cout<<"Sorry, Better Luck For Next Time";
per=sum*100/700;
cout<<"\nYour Percentage-:/n%"<<per;
}
Binary file added C++/ATM And ReportCard/report.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions Python/Programs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Python Programs
### These Programs are very helpful in Learning Python Basic Concepts
### This Will be Updated Regularly
22 changes: 22 additions & 0 deletions Python/Programs/add two matrix.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
To add two matrices-:

Ans-a = [[12,7,3],
[4 ,5,6],
[7 ,8,9]]
b = [[5,8,1],
[6,7,3],
[4,5,9]]
result = [[0,0,0],
[0,0,0],
[0,0,0]]

for i in range(len(a)):
for j in range(len(a[0])):
result[i][j] = a[i][j] + b[i][j]
for c in result:
print(c)

Output-
[17, 15, 4]
[10, 12, 9]
[11, 13, 18]
12 changes: 12 additions & 0 deletions Python/Programs/area of rectangle.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Write a program to calculate area of rectangle-:

Ans
w = float(input('Please Enter the Width of a Rectangle: '))
h = float(input('Please Enter the Height of a Rectangle: '))
Area = w * h
print("\n Area of a Rectangle is: %.2f" %Area)

Output
Please Enter the Width of a Rectangle: 20
Please Enter the Height of a Rectangle: 30
Area of a Rectangle is: 600.00
9 changes: 9 additions & 0 deletions Python/Programs/celsius to fahrenheit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Write a program to read the temperature in Celsius from the user and convert it into Fahrenheit-:

Ans
celsius = 37
fahrenheit = (celsius * 1.8) + 32
print('%0.1f degree Celsius is equal to %0.1f degree Fahrenheit'%(celsius,fahrenheit))

Output-:
37.0 degree Celsius is equal to 98.6 degree Fahrenheit
9 changes: 9 additions & 0 deletions Python/Programs/concatenate list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
To concatenate two lists-:

Ans-list_1 = [1, 'a']
list_2 = [3, 4, 5]
list_joined = list_1 + list_2
print(list_joined)

Output-
[1, 'a', 3, 4, 5]
11 changes: 11 additions & 0 deletions Python/Programs/descending order.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
To sort a list of elements in descending order-:

Ans-NumList = [10,20,80,50,100,60]
print("\nElement Before Sorting is: ", NumList)
NumList.sort(reverse=True)
print("\nElement After Sorting List in Descending Order is:\n", NumList)
OutputElement-

Before Sorting is: [10, 20, 80, 50, 100, 60]
Element After Sorting List in Descending Order is:
[100, 80, 60, 50, 20, 10]
7 changes: 7 additions & 0 deletions Python/Programs/distance-find.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distance.py

distance = eval(input("enter Distance between cities in Km "))

print(distance*1000, " Metres")
print(distance*100000, " Centi Metres")
print(distance*0.6213, " Miles")
14 changes: 14 additions & 0 deletions Python/Programs/divisible by 5 or 10.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Write a program to test whether a number is divisible by 5 and 10 or by 5 or 10-:

Ans
number = int(input(" Please Enter any Positive Integer : "))
if(number % 5 == 0):
print("Given Number {0} is Divisible by 5 ".format(number))
else:
print("Given Number {0} is Not Divisible by 5 ".format(number))

Output
a)Please Enter any Positive Integer : 55
Given Number 55 is Divisible by 5
b)Please Enter any Positive Integer : 59
Given Number 59 is Not Divisible by 5
16 changes: 16 additions & 0 deletions Python/Programs/factorial using recursion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
To calculate the factorial of a number using recursion-:

Ans-def recur_factorial(n):
if n == 1:
return n
else:
return n*recur_factorial(n-1)
num = 10
if num < 0:
print("Sorry, factorial does not exist for negative numbers")
elif num == 0:
print("The factorial of 0 is 1")
else:
print("The factorial of", num, "is", recur_factorial(num))

Output- 3628800
26 changes: 26 additions & 0 deletions Python/Programs/finding week by number.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Write a program to prompt a user to enter a day of the week. If the entered day of the week is between 1 and 7 then display the respective name of the day-:

Ans
weekday = int(input("Enter weekday day number (1-7) : "))

if weekday == 1 :
print("\nMonday");
elif weekday == 2 :
print("\nTuesday")
elif(weekday == 3) :
print("\nWednesday")
elif(weekday == 4) :
print("\nThursday")
elif(weekday == 5) :
print("\nFriday")
elif(weekday == 6) :
print("\nSaturday")
elif (weekday == 7) :
print("\nSunday")
else :
print("\nPlease enter weekday number between 1-7.")

Output
Enter weekday day number (1-7) : 5

Friday
10 changes: 10 additions & 0 deletions Python/Programs/given-list-no..txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To search a number from given list of numbers-:

Ans- mylist = [1, 2, 3, 4, 5, 6, 7, 8]
myinput = int(input("Type in a number "))
print("Number is in the list." if myinput in mylist else "Number not in
list.").

Output-
Type in a number :5
Number is in the list.
20 changes: 20 additions & 0 deletions Python/Programs/greatest number.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Write a program to read three numbers from a user and check if the first number is greater or less than the other two numbers-:

Ans
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
num3 = float(input("Enter third number: "))
if (num1 >= num2) and (num1 >= num3):
largest = num1
elif (num2 >= num1) and (num2 >= num3):
largest = num2
else:
largest = num3
print("The largest number is", largest)

Output
Enter first number: 10
Enter second number: 50
Enter third number: 30

The largest number is 50.0
17 changes: 17 additions & 0 deletions Python/Programs/palidrome.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
palidrome.py(imp)

givenString = (input("Enter a String "))
l = len(givenString)

def checkPalindrome(givenString, l):
newString = ""
for i in range(l-1, -1, -1):
newString += givenString[i]

print(newString)
if newString != givenString:
print("Not Palindrome")
else:
print("Palindrome")

checkPalindrome(givenString, l)
15 changes: 15 additions & 0 deletions Python/Programs/prime-no.-list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
list of prime.py

prime = []
non_Prime = []
a = eval(input("Enter a "))
b = eval(input("Enter b "))
for i in range (a, b):
for j in range(2, i):
if i%j ==0:
non_Prime.append(i)
break
else:
prime.append(i)
print("Prime Numbers between ", a, " and ", b, prime)
print("Non-Prime Numbers between ",a, " and ", b, non_Prime)
10 changes: 10 additions & 0 deletions Python/Programs/printnumbers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
printnumbers.py

count = 0
for i in range(1000,2000):
if count % 10 == 0:
print()
print(i, end = " ")
else:
print(i, end = " ")
count += 1
22 changes: 22 additions & 0 deletions Python/Programs/quadatic-roots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
quadatic roots

import math

a= float(input("Enter A "))
b= float(input("Enter B "))
c= float(input("Enter C "))
print(a)
print(b)
print(c)

if a == 0:
print("Error a=0 cannot be ")
else:
d = (b*b) - (4*a*c)
if d >= 0:
sqRoot = math.sqrt((b*b) - (4*a*c))
root1 = (-b + sqRoot)/2*a
root2 = (-b - sqRoot)/2*a
print("Roots : ",root1, root2)
else:
print("Imaginary Roots")
13 changes: 13 additions & 0 deletions Python/Programs/return 2 numbers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Write a program to return minimum of two numbers-:

Ans
def minimum(a, b):

if a <= b:
return a
else:
return b
a = 2
b = 4
print(minimum(a, b))
Output- 2
13 changes: 13 additions & 0 deletions Python/Programs/square and cube.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Write a program to calculate the square and cube of a number using *operator-:
Ans
def square (num):
return num*num
def cube (num):
return num*num*num
number = int(input("Enter an integer number: "))
print("Square of ",number," is ", square(number))
print("Cube of ",number," is ", cube(number))

OutputEnter an integer number: 5
Square of 5 is 25
Cube of 5 is 125
Loading

0 comments on commit bd44b17

Please sign in to comment.