Sirfpadhai.in Learn to easy Programming πŸ§‘β€πŸ’»
25 subscribers
5 photos
6 files
48 links
SirfPadhai.in is an educational website that provided Computer Science Related Coding Language English in Hindi. Here we publish computer science-related coding languages ​​and software engineering fundamentals in Hindi simple languageπŸ§‘β€πŸ’» Thank you πŸ₯°
Download Telegram
21. Write a JavaScript program to create a new string adding "Py" in front of a given string. If the given string begins with "Py" then return the original string.

function string_check(str1) {
if (str1 === null str1 === undefined str1.substring(0, 2) === 'Py')
{
return str1;
}
return "Py"+str1;
}

console.log(string_check("Python"));
console.log(string_check("thon"));

#sirfpadhai.in
#javascript
22. Write a JavaScript program to remove a character at the specified position of a given string and return the new string.

function remove_character(str, char_pos)
{
part1 = str.substring(0, char_pos);
part2 = str.substring(char_pos + 1, str.length);
return (part1 + part2);
}

console.log(remove_character("Python",0));
console.log(remove_character("Python",3));
console.log(remove_character("Python",5));

#sirfpadhai.in
Youtube Channel for CDAC CCAT Exams

Section A :

Quants and Aptitude :

Career Ride : https://www.youtube.com/watch?v=tnc9ojITRg4&list=PLpyc33gOcbVA4qXMoQ5vmhefTruk5t9lt

5 Minute Engineering : https://www.youtube.com/watch?v=eQN_sz2crc0&list=PLYwpaL_SFmcBpa1jwpCbEDespCRF3UPE5

Verbal Ability : https://www.youtube.com/watch?v=TNkq01wrqUg&list=PLpyc33gOcbVBbD8Vfy-gCbivjSSHbMpUX

Reasoning : https://www.youtube.com/watch?v=fgE9J2SR8L8&list=PL1zxEeUFe9leRBWC-g-ZkJkpbl4F3Hg0F

Section B :

C Programming :
Jenny's Lecture : https://www.youtube.com/watch?v=EjavYOFoJJ0&list=PLdo5W4Nhv31a8UcMN9-35ghv8qyFWD9_S

Apna College : https://www.youtube.com/watch?v=irqbmMNs2Bo&pp=ygUOQyBwcm9ncmFtbWluZyA%3D

Code with Harry : https://www.youtube.com/watch?v=7Dh73z3icd8&list=PLu0W_9lII9aiXlHcLx-mDH1Qul38wD3aR

Saurabh Shukla : https://www.youtube.com/watch?v=Bjzfag1zZPg&list=PLe_7x5eaUqtWp9fvsxhC4XIkoR3n5A-sF

C++ :
Code with Harry : https://www.youtube.com/watch?v=yGB9jhsEsr8&pp=ygUMYysrIHR1dG9yaWFs

Saurabh Shukla : https://www.youtube.com/watch?v=Iuo9PpGE04Y&list=PLLYz8uHU480j37APNXBdPz7YzAi4XlQUF

Neso Academy : https://www.youtube.com/watch?v=s0g4ty29Xgg&list=PLBlnK6fEyqRh6isJ01MBnbNpV3ZsktSyS

Love Babber : https://www.youtube.com/watch?v=i_5pvt7ag7E&pp=ygUOb29wcyB1c2luZyBjKys%3D

College Wallah : https://www.youtube.com/watch?v=9roJTTghZJI&pp=ygUOb29wcyB1c2luZyBjKys%3D

DSA :
Last Moment Tuitions : https://www.youtube.com/watch?v=5c4xxrEjlq8&list=PL0s3O6GgLL5c-NQuZLBlR000KWxGb8A5j&pp=gAQB

Code with Harry : https://www.youtube.com/watch?v=5_5oE5lgrhw&list=PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi

Jenny's Lectures : https://www.youtube.com/watch?v=AT14lCXuMKI&list=PLdo5W4Nhv31bbKJzrsKfMpo_grxuLl8LU


Operating System :
Gate Smasher : https://www.youtube.com/watch?v=bkSWJJZNgf8&list=PLxCzCOWd7aiGz9donHRrE9I3Mwn6XdP8p

Apna College : https://www.youtube.com/watch?v=ktP8QsPzKfs&pp=ygURb3BlcmF0aW5nIHN5c3RlbSA%3D

Big Data : https://www.youtube.com/watch?v=pqT4AgPuzZ0&list=PL6UwySlcwEYJ2hFuGIvr4VEHUAfl-GCNT

Artificial Intelligence :
Gate Smashers : https://www.youtube.com/watch?v=uB3i-qV6VdM&list=PLxCzCOWd7aiHGhOHV-nwb0HR5US5GFKFI

Section C :

Microprocess :
Bharat Acharya : https://www.youtube.com/watch?v=0M74z5jEAyA&list=PLfzBO7vcQZ1L1wE17y07ZR4Vxw0EHibTM&pp=iAQB

Last Moment Tuitions : https://www.youtube.com/watch?v=yXg1jGBzhl4&list=PL0s3O6GgLL5cN1svnyKJrGovdK2mkLZXE&pp=gAQB


Digital Electronics :
Neso Academy : https://www.youtube.com/watch?v=M0mx8S05v60&list=PLBlnK6fEyqRjMH3mWf6kwqiTbT798eAOm

Knowledge Gate : https://www.youtube.com/watch?v=ztkMRln_jDA&list=PLmXKhU9FNesSfX1PVt4VGm-wbIKfemUWK

Engineers ki Pathshala : https://www.youtube.com/watch?v=GH9LoyFPn2g&list=PL9RcWoqXmzaJN3LcyxBm2tLjUk8wvOYrv

Computer Architecture:
Last Moment Tuitions : https://www.youtube.com/watch?v=IfX4BT7HRNo&list=PL0s3O6GgLL5es3eh6-E4JVnymMqZKRAHH&pp=gAQB

Gate Smashers : https://www.youtube.com/watch?v=L9X7XXfHYdU&list=PLxCzCOWd7aiHMonh3G6QNKq53C6oNXGrX

Neso Academy : https://www.youtube.com/watch?v=Ol8D69VKX2k&list=PLBlnK6fEyqRgLLlzdgiTUKULKJPYc0A4q

Download LMT App for CCAT Exams Preparation : https://play.google.com/store/apps/details?id=co.jones.cjzgt

Regards

#sirfpadhai.in
23. Write a JavaScript program to create a new string from a given string changing the position of first and last characters. The string length must be greater than or equal to 1.

function first_last(str1)
{
if (str1.length <= 1)
{
return str1;
}
mid_char = str1.substring(1, str1.length - 1);
return (str1.charAt(str1.length - 1)) + mid_char + str1.charAt(0);
}
console.log(first_last('a'));
console.log(first_last('ab'));
console.log(first_last('abc'));

#sirfpadhai.in
#javascript
12. Program to find the roots of a quadratic equation.

#include<stdio.h>
#include<conio.h>
#include<math.h>

void main()
{
float a, b, c, discriminant, real;
double r1, r2, imag;

printf("Enter coefficients a, b and c: ");
scanf("%f%f%f", &a, &b, &c);

discriminant = b * b - 4 * a * c;
if (discriminant > 0)
{
r1 = (-b + sqrt(discriminant)) / (2 * a);
r2 = (-b - sqrt(discriminant)) / (2 * a);
printf("Roots are: %.2f and %.2f", r1, r2);
}
else if (discriminant == 0)
{
r1 = r2 = -b / (2 * a);
printf("Roots are: %.2f and %.2f", r1, r2)
}
else
{
real = -b / (2 * a);
imag = sqrt(-discriminant) / (2 * a);
printf("Roots : %.2f+%.2fi and %.2f-%.2fi", real, imag, real, imag);
}
getch();
}
#if_else

#sirfpadhai.in

#Clanguage
13. Program to accept rollnumber and marks of three subjects from user and print total marks, average and grade.

#include<stdio.h>
#include<conio.h>

void main()
{
int RollNum, m1, m2, m3, total;
float avg;
clrscr();

printf("Enter Roll Number : ");
scanf("%d",&RollNum);

printf("Enter marks for three subjects : ");
scanf("%d %d %d", &m1, &m2, &m3);

total = m1 + m2 + m3;
avg = total / 3.0;

printf("\nTotal is : %d", total);
printf("\nAverage is : %5.2f", avg);

if(avg>80)
printf("\nGrade : A");
else if((avg>60)&&(avg<=80))
printf("\nGrade : B");
else if((avg>40)&&(avg<=60))
printf("\nGrade : C");
else if((avg>=33)&&(avg<=40)
printf("\nGrade : D");
else
printf("\nGrade : Fail");

getch();
}
#if_else

#Clanguage

#sirfpadhai.in
πŸ‘1
24. Write a JavaScript program to create a new string from a given string with the first character of the given string added at the front and back.

function front_back(str)
{
first = str.substring(0,1);
return first + str + first;
}
console.log(front_back('a'));
console.log(front_back('ab'));
console.log(front_back('abc'));


#javascript
#sirfpadhai.in
Forwarded from IT World
Learn Data science in your native language and earn upto 21 LPA!
Certified by IIT Madras Pravartak, this is a 3-5 month course that comes with assured job opportunities!
Click the link below to register now and start your career in data science

https://bit.ly/40Qjg7e
Best YouTube Playlists to learn Programming:

πŸ”ΈC
youtube.com/playlist?list=…

πŸ”ΈC++
youtube.com/playlist?list=…

πŸ”Έ Python
youtube.com/playlist?list=…

πŸ”ΈData Science
imp.i384100.net/1rq3Km

πŸ”Έ JavaScript
youtube.com/playlist?list=…

πŸ”ΈJava
youtube.com/playlist?list=…

πŸ”ΈData Structures and Algorithms
imp.i384100.net/jrogG0

πŸ”ΈC#
youtube.com/playlist?list=…

πŸ”ΈJavaScript
imp.i384100.net/XYDqvg

πŸ”ΈSQL
youtube.com/playlist?list=…

πŸ”Έ Go
youtube.com/playlist?list=…

πŸ”ΈPHP
youtube.com/playlist?list=…

πŸ”Έ Python
imp.i384100.net/21x3eQ

πŸ”ΈSwift
youtube.com/playlist?list=…

πŸ”ΈKotlin
youtube.com/playlist?list=…

πŸ”ΈDart
youtube.com/playlist?list=…

πŸ”ΈC and C++
imp.i384100.net/NkOVJ2

πŸ”ΈRuby
youtube.com/playlist?list=…

πŸ”ΈRust
youtube.com/playlist?list=…

πŸ”Έ Blockchain
imp.i384100.net/LXbG1M

πŸ”ΈTypeScript
youtube.com/playlist?list=…

πŸ”ΈR
youtube.com/playlist?list=…

πŸ”ΈReact
youtube.com/playlist?list=…

πŸ”ΈNext.js
youtube.com/playlist?list=…

πŸ”ΈNode.js
youtube.com/playlist?list=…

πŸ”ΈJava
imp.i384100.net/QymgX3

πŸ”ΈHTML/CSS
youtube.com/playlist?list=…

πŸ”ΈMachine Learning
youtube.com/playlist?list=…

πŸ”ΈDeep Learning
youtube.com/playlist?list=…

πŸ”ΈDSA
youtube.com/playlist?list=…

πŸ”ΈAI
imp.i384100.net/jrog40
βœ… *Java Control Statements* πŸ§ β˜•

1️⃣ *if Statement*
Executes a block if the condition is true.
if (age > 18) { System.out.println("Adult"); }

2️⃣ *if-else Statement*
Gives two paths: true or false.
if (marks >= 40) { ... } else { ... }

3️⃣ *else-if Ladder*
Checks multiple conditions one by one.
if (...) { } else if (...) { } else { }

4️⃣ *switch Statement*
Best for multiple fixed values.
switch(day) {
case 1: System.out.println("Monday"); break;
...
}

5️⃣ *for Loop*
Repeats a block a fixed number of times.
for (int i = 0; i < 5; i++) { ... }

6️⃣ *while Loop*
Runs while the condition is true.
while (count < 5) { ... }

7️⃣ *do-while Loop*
Runs once even if the condition is false.
do { ... } while (condition);

8️⃣ *break Statement*
Exits from loop or switch early.
if (x == 5) break;

9️⃣ *continue Statement*
Skips to the next iteration.
if (x == 3) continue;

πŸ”Ÿ *return Statement*
Ends method execution and optionally returns a value.

πŸ’¬ *Tap ❀️ for more!*