0% found this document useful (0 votes)
5 views6 pages

Programming Tasks for Beginners

The document outlines a series of programming tasks including finding the roots of a quadratic equation, checking if a number is prime, generating prime numbers, creating pyramids of characters, and performing various operations on strings. Each task includes specific requirements such as identifying character types, printing character names, and manipulating string content. The tasks are designed to enhance programming skills in handling mathematical concepts and string operations.

Uploaded by

Alan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Programming Tasks for Beginners

The document outlines a series of programming tasks including finding the roots of a quadratic equation, checking if a number is prime, generating prime numbers, creating pyramids of characters, and performing various operations on strings. Each task includes specific requirements such as identifying character types, printing character names, and manipulating string content. The tasks are designed to enhance programming skills in handling mathematical concepts and string operations.

Uploaded by

Alan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Write a program to find the roots of a quadratic equation




2. Write a program to accept a number ‘n’ and​
a.) Check if ’n’ is prime ​



b.) Generate all prime numbers till ‘n’​
c.) Generate first ‘n’ prime numbers
3. Write a program to create a pyramid of the character ‘*’ and a reverse pyramid

Pyramid

Reverse Pyramid
4. Write a program that accepts a character and performs the following:​
a. print whether the character is a letter or numeric digit or a special character. ​
b. if the character is a letter, print whether the letter is uppercase or lowercase ​
c. if the character is a numeric digit, prints its name in text (e.g., if input is 9, output
is NINE)
5. Write a program to perform the following operations on a string ​
a. Find the frequency of a character in a string. ​
b. Replace a character by another character in a string. ​
c. Remove the first occurrence of a character from a string.​
d. Remove all occurrences of a character from a string

You might also like