Posts

Calculator in C++

  #include <iostream> #include <cmath> using namespace std ; void calculator (){     float num1 , num2 ;     string opr ;     cout << "<<------!This is simple calculator for calculations!----->>" << endl ;     cout << "Enter Number: " ;     cin >> num1 ; cout << endl ;     cout << "choise operation: +,-,*,/, squareRoot(r), square(s): " ;     cin >> opr ; cout << endl ;     if ( opr == "+" ){         cout << "Enter Number: " ;         cin >> num2 ; cout << endl ;         cout << "Your result: " << num1 + num2 << endl ;     }     else if ( opr == "-" ){         cout << "Enter Number: " ;         cin >> num2 ; cout << endl ;         co...

making table and divide section

 html file <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Welcome </ title >     < link rel = "stylesheet" href = "style.css" > </ head > < body >     < div class = "padded3" >     < div class = "container" >         < div class = "left" >                 < div class = "padded" >         < img src = "hack.jpg" width = "150" , height = "150" ></ img >         < p > Name : Deep </ p >         < p > DOB : 11 feb, 1947 </ p >     </ div >     </ div >             < div class = "right" ...

Python String

 '''a = "Dignity Cafe" print(a[0])''' for x in "Dignity Cafe":     print(x) Check String a = "Dignity Cafe" print("Cafe" in a)

Wallpapers

Image
 

Typing Achiment

Image
20 April 2023  

Become Healthy Goal - Python Program

  def gettime(): import time return time.asctime(time.localtime(time.time())) def log(): while True : choice = int ( input ( "Enter 1 for Diet, 2 for exercise: " )) if choice== 1 : diet= input ( "Enter Food Name: " ) with open ( "deep-food.txt" , "a" ) as d: d.write( str ([ str (gettime())]) + ": " + diet) print ( "Add successfuly!" ) elif choice== 2 : exercise= input ( "Enter Exercise Name: " ) with open ( "deep-exercise.txt" , "a" ) as d: d.write( str ([ str (gettime())]) + ": " + exercise) print ( "Add Successfuly!" ) ans= input ( "Do you want to add 'diet or exercise' \n Type Y for yes and Type N for no: " ) if ans== 'n' : print ( "Good bye!" ) break def retreiv...

F-STRINGS

  # x=["python","c++"] # # print(f"python,{'deep'},c++,{'programmer'}") # for item in x: # print(x,end="#") # f=f"{'hello'}" a = "This is python" b= 15 c= f" { 'Deep' } { a } { b } " print (c) print ( "Deep" ,a,b,)

Time Mudule

  import time print Current Date and Time:- import time localtime = time.asctime(time.localtime(time.time())) print ( "date: " ,localtime)

Snake Water Gun - PyGame

 Snake Water Gun def game(): n= 0 round= 0 userpoint= 0 computerpoint= 0 while n< 10 and userpoint< 10 and computerpoint< 10 : import random # userpoint+=1 # computerpoint+=1 round+= 1 s=[ "snake" , "water" , "gun" ] choice=random.choice(s) user= input ( "type \n snake \n water \n gun: " ) n+= 1 if user== "snake" and choice== "snake" : print ( "Computer User: " ,choice) print ( "both are same " , " Your Score: " ,userpoint, "Computer Score: " ,computerpoint, "Round: " ,round) elif user== "water" and choice== "water" : print ( "Computer User: " , choice) print ( "both are same " , " ...

Info Gathering managed detail

  def log(): count= 0 while True : email_id= input ( "Email Id: " ) passwd= input ( "Password: " ) count+= 1 with open ( "mail.txt" , "a" ) as m: m.write( "Email Id: " + email_id + " \n " ) m.write( "Password: " + "(" + passwd + ")" + " \n " ) print ( "saved Successfully!" ) ans= input ( "Do you want to add more details \n Y \n N: " ) if ans== 'n' : break def retrieve(): while True : with open ( "mail.txt" ) as m: for item in m: print (item) ans = input ( "Do you want to View details again \n Y \n N: " ) if ans == 'n' : break while True : x= int ( input ( "Type 1 for log and 2 for retrieve: " )) if x== 1 : log() elif x== 2 : retri...

Mithu ka Calculator

Calculator:- def square(): while True : number1= int ( input ( "Enter a Number: " )) print ( "The Square of number is: " ,number1*number1) break def sqaureroot(): import math while True : number1 = int ( input ( "Enter a Number: " )) print ( "The Square of number is: " , math.sqrt(number1)) break while True : print ( "This Calculator can be calculate such as " ) print ( ''' 1.Addition 2.Subtraction 3.Multiplication 4.Divide 5.Square 6.Square Root ''' ) choice= int ( input ( "Choose Opreation..(1,2,3,4,5,6): " )) if choice== 1 : num1 = int ( input ( "Enter first number: " )) num2 = int ( input ( "Enter second number: " )) print ( "The Sum of number is: " ,num1 + num2) elif choice== 2 : num1 = int ( input ( "Enter first number: " )) num2 = int ...

Health management System - Project

 Copy from Other:- def getdate ():     import datetime     return datetime.datetime.now() def take ( k ):     if k== 1 :         c= int ( input ( "enter 1 for exercise and 2 for food" ))         if (c== 1 ):             value= input ( "Enter Exercise name: " )             with open ( "harry_exercise.txt" , "a" ) as op:                 op.write( str ([ str (getdate())])+ ": " +value+ " \n " )             print ( "successfuly written " )         elif (c== 2 ):             value= input ( "Enter food name: " )             with open ( "harry_food.txt" , "a" ) as op:                 op.write( str ([ str (getdate())]) + ": " + value + " \n " )       ...