Sunday, June 29, 2025

Random Quotes Generator


 

Code:

<script>
    function getq(){
        const quotes = ["A","B","C","D","E","F"];
        const colr= ["red","green","black","pink"];
        var x = Math.floor(Math.random()*quotes.length);
        document.getElementById("show").innerText = quotes[x];
        document.getElementById("show").style.backgroundColor = colr[x];
        document.getElementById("show").style.color = "white";


// alert(quotes[4]);

    }
</script>

<div id="show"></div>
<input type="button" onclick="getq()" value="Generate Quotes">

See video - Go to video

Tuesday, June 24, 2025

Variable , Assign multiple variable in python with short program


 

See video - Go to video

Code :

#variable
x = 7
y = 5
z = 9
print(x+y+z)


#assign multiple variable
x,y,z = "hello","phpecho","please like"  
print(x,y,z)
x,y,z = 3,5.9,9.1  
print(x+y+z)


#variable swaping program
p = 9
q = 8
result = str(p)+str(q)   #str show value as a text
print("The number was",result)

d = p    # d is the temporary varibale
p = q
q = d
result = str(p)+str(q)
print("The reverse of number is", result)

  1. What is Google Opal? It’s a no-code / low-code AI mini-app builder developed by Google Labs. You describe what you want in natural ...