Posts

objects in python

# Online Python compiler (interpreter) to run Python online. class Dog: # Class attribute species = "Canis familiaris" # Constructor method def __init__(self, name1, age): self.name= name1#jo pass karoge vo variable me jayega and variable ka name kuch bhi ho sakta hai bcz we access that with the help of variable name and due to self means it denotes objects same variable name is used for multiple objects bcz we refer variable by object likke self.name here self is object name it is referring to that object # Instance attribute self.age= age # Instance attribute # Instance method def bark(self): print(f"{self.name} barks!") # Instance method def get_info(self): return f"{self.name} is a {self.species} and is {self.age} years old." d1 = Dog("hi",20) info=d1.get_info() print(info)

React

import React from 'react' function changeuser() { let user ='Aditya'; console.log(user); function changename(){ user ="Aditya badiger"; console.log(user); } return ( The username is {user} change user ) } export default changeuser this code is not working because we store variables in a new way in react import React, { useState } from 'react' function App() { const [a, setA] = useState(1) return ( hello the number is {a} setA(a + 10)}>Incremenet setA(a-10)}>Decrement ) } export default App this code refers to creating variables

Apology

Apology Please Apologize me First click button 1 and then 2 You can only proceed when you click button 1 Apologize Your Favorite Junior Apology Message

Jarvis my first python project

import pyttsx3 import datetime import speech_recognition as sr engine = pyttsx3.init( 'sapi5' ) voices = engine.getProperty( 'voices' ) print (voices) engine.setProperty( 'voice' , voices[ 0 ].id) def speak (audio):     engine.say(audio)     engine.runAndWait() def wishMe ():       hour = int (datetime.datetime.now().hour)     if hour >= 0 and hour < 12 :         speak( "Good morning" )     elif hour > 12 and hour < 18 :         speak( "Good afternoon" )         speak( "I am jarvis how can i help you sir" )             else :         speak( "Good evening" )         speak( "I am jarvis how can I help you sir" )     def takeCommand ():     r = sr.Recognizer()     with sr.Microphone as source:         print ( "Listening..." ) if...

Float in CSS

Image
Float_challenge Using Float to Social Media Icons Facebook (stylized as facebook) is an American online social media and social networking service based in Menlo Park, California, and a flagship service of the namesake company Facebook, Inc. It was founded by Mark Zuckerberg, along with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin Moskovitz, and Chris Hughes. Instagram (commonly abbreviated to IG or Insta)[8] is an American photo and video sharing social networking service created by Kevin Systrom and Mike Krieger. In April 2012, Facebook acquired the service for approximately US$1 billion in cash and stock. The app allows users to upload media that can be edited with filters and organized by hashtags and geographical tagging. ...

Payment form

Payment form Payment form Contact information Required fields are followed by * Name: * Gender Male Female Address: Email: * Pincode: Payment Information Card Type: * Select card type Visa Rupays Card number Expiration date: CVV This is the payment form

First website

Image
Apni Kaksha | Home Apni Kaksha Home College Reviews Courses Study materials Login/sign up Courses College Reviews Study materials Our Founder Aman Dhattarwal YouTube  |  Instagram  |  He is one of the most influencing guy he is an solopreneur He is one of the top educator in unacademy He help students to get good cources for free and grow for free FAQ Contact Us Terms of Use Privacy policy Refund Policy © 2020 | Apni Kakha