Using for loop c programmes

Great! Practicing for loops in C is an excellent way to strengthen your understanding of programming logic and structure. Here are 10 C programming exercises using for loops for practice, from beginner to intermediate level: --- ✅ 1. Print Numbers from 1 to N Goal: Input n and print numbers from 1 to n. int n; printf("Enter a number: "); scanf("%d", &n); for (int i = 1; i <= n; i++) {     printf("%d ", i); } --- ✅ 2. Sum of First N Natural Numbers Goal: Input n, output sum 1 + 2 + ... + n. int n, sum = 0; printf("Enter a number: "); scanf("%d", &n); for (int i = 1; i <= n; i++) {     sum += i; } printf("Sum = %d\n", sum); --- ✅ 3. Factorial of a Number Goal: Input n, calculate n!. int n, fact = 1; printf("Enter a number: "); scanf("%d", &n); for (int i = 1; i <= n; i++) {     fact *= i; } printf("Factorial = %d\n", fact); --- ✅ 4. Multiplication Table Goal: Input n, print tabl...

python in brief

What is Python?

·         Python is a dynamically typed, general purpose programming language that supports an object-oriented programming approach as well as a functional programming approach.

·         Python is an interpreted and a high-level programming language.

·         It was created by Guido Van Rossum in 1989.

 

 

Features of Python

·         Python is simple and easy to understand.

·         It is Interpreted and platform-independent which makes debugging very easy.

·         Python is an open-source programming language.

·         Python provides very big library support. Some of the popular libraries include NumPy, Tensorflow, Selenium, OpenCV, etc.

·         It is possible to integrate other programming languages within python.

What is Python used for

·         Python is used in Data Visualization to create plots and graphical representations.

·         Python helps in Data Analytics to analyze and understand raw data for insights and trends.

·         It is used in AI and Machine Learning to simulate human behavior and to learn from past data without hard coding.

·         It is used to create web applications.

·         It can be used to handle databases.

·         It is used in business and accounting to perform complex mathematical operations along with quantitative and qualitative analysis.


Comments

Popular posts from this blog

advance loop based C programmes