Posts

Source code for python programs

How to Setup app-ads.txt file in admob

Image
  AdMob provides a personalized code snippet that makes setting up your app-ads.txt file easier. The customized code snippet includes your publisher ID.  Note that your  publisher ID  must be included and formatted correctly for your app-ads.txt file to be verified.  To get your personalized code snippet, which includes your publisher ID: Sign in to your AdMob account at  https://apps.admob.com . Click  Apps  in the sidebar. Click  All apps . Click the  app-ads.txt  tab. Click  How to set up app-ads.txt .  Click next to the code snippet to copy.  Paste the code snippet into your app-ads.txt file. 

funny tictok videos

Currency converter code for android studio

 Today i will give the code for currency converter code for android app if you are a beginner in android programming so it will help for you to create a converter so first you can copy and paste my code according to your program and run it so first you create android project after that on your Main Activity you can paste below code on you program public class MainActivity extends AppCompatActivity {     public void btnClick(View view){         EditText dollarAmount = (EditText) findViewById(R.id.dollorAmount);         String dollars = dollarAmount.getText().toString();         Double doubleDollars = Double.parseDouble(dollars);         Double doubleInr = 73.78 * doubleDollars;         String toastText = "= " + doubleInr.toString() + " R";         Toast.makeText(this, toastText, Toast.LENGTH_SHORT).show();         String res = "= " + doubleInr.toString() + " Rupees";         EditText result = (EditText) findViewById(R.id.result);         result.se

Open the Web browser with speech recognition in python program

 Hi guys here you can build a program in python who open the web browser when you speak the program get the command and open the web browser you must enjoy it you can use in your program and add more functionality. import speech_recognition as sr import webbrowser   r1 = sr.Recognizer() r2 = sr.Recognizer() r3 = sr.Recognizer()   with sr.Microphone() as source:     print('[search shabdkosh: search youtube]')     print('speak now')     audio = r3.listen(source)   if 'youtube' in r2.recognize_google(audio):     r2 = sr.Recognizer()     url = f"https://www.youtube.com/results?search_query"     with sr.Microphone() as source:         print('search you query')         audio = r2.listen(source)           try:             get = r2.recognize_google(audio)             print(get)             webbrowser.get().open(url+get)           except sr.UnknownValueError:             print('Error')      

Make your own Jarvis in python

  Make your own jarvis program:  here i give a code for jarvis you can copy or paste the program and use it    //First import all libraries  import pyttsx3 import webbrowser import smtplib import random import speech_recognition as sr import wikipedia import datetime # import wolframalpha import os import sys   // here instiallize the engine object engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voice', voices[len(voices) - 1].id)   // create speak function   def speak(audio):     print('Computer: ' + audio)     engine.say(audio)     engine.runAndWait()   // create greet function that will greet your user according the time def greetMe():     currentH = int(datetime.datetime.now().hour)     if currentH >= 0 and currentH < 12:         speak('Good Morning!')       if currentH >= 12 and currentH < 18:         speak('Good After

Login Python Source code

Hi Guys if you are a beginner in python so that code will improve your programming skill, i will give here simple  login program for python that you can use in your program and add more functionality First import all library   from tkinter import * from PIL import ImageTk,Image from tkinter import messagebox from tkinter import ttk import os import csv     def open_win():     top = Toplevel()   def fun():       with open("username_info.txt","r") as file1:         file_reader = csv.reader(file1)         file1.close()       login_b1 = Button(root, text="Log in", command=log()).pack()   def log(file1):       user = username_verify.get()     pas = password_verify.get()       for row in file1:         if row[0] == user and row[1] == pas:             open_win()           else:             messagebox.show("Password incorrect")     """     list_file = os.listdir()    

Chess Design in python

from tkinter import * root = Tk() root.geometry("250x450") root.title("Calculater") E1=Entry(root,width=30) E1.grid(column=0,row=0,columnspan=3,padx=10,pady=10) def btn_click(number):     current= E1.get()     E1.delete(0,END)     E1.insert(0,str(current) + str(number)) def btn_clear():     E1.delete(0,END) def btn_add():     x = E1.get()     y = E1.get()     result = E1.get()     #global f_num     #global s_num     global res               #f_num = int(x)    # s_num = int(y)     res=int(result)     E1.delete(0,END)     res = x + y     #E1.insert(0,first_number + second_number == int(result))               #result = E1.get() def btn_minus():     #E1.insert(0,f_num - int(second_number)== result)     E1.delete(0,END)        def btn_equal():     #second_number = E1.get()     E1.delete(0,END)    # res = f_num + s_num     E1.insert(0,res)     #E1.insert(0,f_num + s_num)    # E1.insert(0,f_num - int(second_number)) B1=Button(root,text="1",padx=30,pady=20,command

Popular posts from this blog

Currency converter code for android studio

Login Python Source code

Make your own Jarvis in python