├── a.html
├── app.js
├── formulas.txt
└── index.html
/a.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | a
7 |
8 |
32 |
33 |
34 |
35 | Celsius To Fahrenheit
36 |
37 | Fahrenheit To Celsius
38 |
39 | Celsius To Kelvin
40 |
41 | Kelvin To Celsius
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | ////// =======================1==================
2 | ////// show data input data in h1
3 |
4 | function Stextbtn(){
5 | let text=document.getElementById("textt").value;
6 | document.getElementById("shere").innerText=text;
7 |
8 | }
9 | ////// =======================2==================
10 | ////// chech number ispositive,negative or zero
11 | function ncheck(){
12 | let incheck=document.getElementById("incheck").value;
13 | let rescheck=Math.sign(incheck);
14 | document.getElementById("scheck").innerText=rescheck;
15 | }
16 | ////////// method 2
17 | function ncheck(){
18 |
19 | let incheck=document.getElementById("incheck").value;
20 |
21 | if(incheck>0){
22 | document.getElementById("scheck").innerText=`the number ${incheck} is positive`;
23 | }else if(incheck==0){
24 | document.getElementById("scheck").innerText=`the number ${incheck} Zero`;
25 | }else {
26 | document.getElementById("scheck").innerText=`the number ${incheck} is Negative`;
27 |
28 | }
29 |
30 |
31 | }
32 |
33 | ////// =======================3==================
34 | ////// find squre root of given number
35 | function sqrotfun(){
36 | let sqrroot=document.getElementById("sqrroot").value;
37 | let maroot=Math.sqrt(sqrroot)
38 | document.getElementById("shosqroot").innerText=maroot;
39 | }
40 | ////// =======================4==================
41 | ////// show and hide section
42 | function shbt(){
43 | document.getElementById("parashow").style.display="block";
44 | }
45 | ////// =======================5 =Temperature=================
46 |
47 | //////Convert Celcious TO Fareheight
48 | function cfcheck(){
49 | let cfcheck=document.getElementById("cfvalue").value;
50 | let f=(1.8*cfcheck)+32;
51 | let a= document.getElementById("cfshow").innerText=`The Farenheit of ${cfcheck} Number is ${f}`;
52 | }
53 | //////Convert Fareheight TO Celcious
54 |
55 | function fccheck(){
56 | let fccheck=document.getElementById("cfvalue").value;
57 | let c=(fccheck-32)/1.8;
58 | let b= document.getElementById("cfshow").innerText=`The Celcious of ${fccheck} Number is ${c}`;
59 | }
60 | //////Celcious TO Kelvin
61 |
62 | function ckcheck(){
63 | let ckcheck=document.getElementById("cfvalue").value;
64 | let kel=273+ckcheck;
65 | let b= document.getElementById("cfshow").innerText=`The Kelvin of ${ckcheck} Number is ${kel}`;
66 | }
67 | ////// Kelvin To Celcious
68 |
69 | function kccheck(){
70 | let kccheck=document.getElementById("cfvalue").value;
71 | let cel=kccheck-273;
72 | let b= document.getElementById("cfshow").innerText=`The Celcious of ${kccheck} Number is ${cel}`;
73 | }
74 |
75 | ////// =======================6 =Mathi=================
76 |
77 | //////// for aquare root
78 | function MathiFun(){
79 | let dataVal=document.getElementById("mathinput").value;
80 | let valroot=Math.sqrt(dataVal);
81 | // let valEvOd=Math.sign(dataVal);
82 |
83 | if (dataVal>0){
84 | document.getElementById("shomathi").
85 | innerText=`the number ${dataVal} is Positive`;
86 |
87 | }else if(dataVal==0){
88 | document.getElementById("shomathi").
89 | innerText=`the number ${dataVal} is Equa; To Zero`;
90 | }else if(dataVal<0){
91 | document.getElementById("shomathi").
92 | innerText=`the number ${dataVal} is Negative`;
93 | }else if(dataVal){
94 |
95 |
96 | document.getElementById("shomathi").
97 | innerText=valroot;
98 | // document.getElementById("shomathi").
99 | // innerText=`the number ${dataVal} is In valid`;
100 | }
101 |
102 |
103 | document.getElementById("shomathi").
104 | innerText=valroot;
105 | }
106 | //////// for even and odd numbe checking
107 |
108 | // function Evnod(){
109 | // let Evnod=document.getElementById("mathinput").value;
110 |
111 | // let valeveodd=Math.sign(Evnod);
112 | // document.getElementById("shomathi").innerText=valeveodd;
113 |
114 |
115 | // }
116 |
117 | //////////======== generate random number =====
118 | // let d=Math.random();
119 | // console.log(d);
120 | // d=d*(100-1)+1;
121 | // console.log(d);
122 | // console.log(Math.floor(d));
123 | // ////////// new method
124 | // let c=Math.random();
125 | // c=c*1000;
126 | // console.log(Math.floor(c));
127 |
128 | //////////======== find greatest number========
129 | // let a=prompt("enter first no")
130 | // let b=prompt("enter second no")
131 | // let c=prompt("enter third no")
132 | // let d=prompt("enter forth no")
133 | // let e=prompt("enter five no")
134 |
135 | // let o=Math.max(a,b,c,d,e);
136 | // console.log(`${a},${b},${c},${d},${e} the largest number is : ${o}`);
137 |
138 |
139 |
140 | // =============================================new pra start from 09 september=============================================
141 |
142 |
143 | // function showdata(){
144 |
145 | // let email=document.getElementById("email").value;
146 | // let pass=document.getElementById("pass").value;
147 | // document.getElementById("showdetail").innerHTML+=`email : ${email} password : ${pass} `;
148 |
149 | // ["email", "pass"].forEach(e => document.getElementById(e).value = "");
150 | // }
151 | function showdata() {
152 | window.c="capital";
153 | let email = document.getElementById("email").value;
154 | let pass = document.getElementById("pass").value;
155 |
156 | document.getElementById("showdetail").innerHTML += `email : ${email} password : ${pass} `;
157 |
158 | localStorage.setItem("userData", JSON.stringify({ email, pass }));
159 |
160 | ["email", "pass"].forEach(e => document.getElementById(e).value = "");//2 tarikha ha iska data empty karna kaliya
161 | }
162 | document.write(window.c)
163 |
164 |
165 | // document.getElementById("email").value="";
166 | // document.getElementById("pass").value="";
167 |
168 | // document.getElementById("showdetail").innerHTML+=`Your Email is = ${email} \n Your Password is =${pass} `;
169 | // document.getElementById("showdetail").innerHTML+=``;
170 | // document.getElementById("showdetaill").innerHTML+=``;
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
--------------------------------------------------------------------------------
/formulas.txt:
--------------------------------------------------------------------------------
1 | 1-farenheit=(1.8*celcious)+32
2 | 2-cecious=(f/1.8)-32
3 | 3-celcious to kelvin ...k=273+c;
4 | 4-kevin to celcious ..c=k-273;
5 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | js pratice
8 |
9 | ee
10 |
11 |
12 | ----1-----show input data in h1---------
13 |
14 | show-text-in-H1
15 |
16 |
17 |
18 |
19 | ---2------check number is positive,negative or zero using Math.sign() or if statement--------- .
20 |
21 | Check N +,_ or 0
22 |
23 |
24 |
25 |
26 | ----3-----square root if given number using "Math.sqrt()"---------
27 |
28 | square root
29 |
30 |
31 |
32 |
33 | ----4-----show and hide section---------
34 |
35 |
Lorem ipsum dolor sit amet consectetur adipisicing elit. Facere porro eum rem optio quasi, rerum exercitationem soluta a esse consequuntur qui quia labore obcaecati corrupti, minus hic assumenda at doloribus?
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ---5------Temperature ---------
45 |
46 |
47 |
48 | Celsius To Fahrenheit
49 |
50 | Fahrenheit To Celsius
51 |
52 | Celsius To Kelvin
53 |
54 | Kelvin To Celsius
55 |
56 |
57 |
58 |
59 | ---6------Mathi Prob solver ---------
60 |
61 |
62 |
63 | Find Mathi Fun
64 |
65 | for even and odd numbe checking
66 | Even/Odd
67 |
68 |
69 |
70 |
71 |
72 | enter your email
73 |
74 |
75 | enter your password
76 |
77 |
78 |
79 | showdata
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------