# Basics of Coding - Lecture 1

1. What is coding?

->Coding refers to the process of creating instructions for a computer to

perform specific tasks. It involves writing lines of code using a programming

language that follows a defined syntax and set of rules.

Coding can be used to create software applications, websites, algorithms, and

much more. It is a fundamental skill in the field of computer science and in

essential for anyone interested in software development, data analysis,

machine learning, and various other technological domains.

2. What is algorithm?

->An algorithm is a set of clear and specific instructions that guide the

computer to solve a problem or complete a task efficiently and accurately. It’s

like a recipe that tells the computer exactly what do to achieve a desired

outcome.

3. Who created Python?

-> Python was created by Guido van Rossum. He started developing Python in

the late 1980s, and the first version of the programming language was released

in 1991.

4. What is Python?

->Python is a popular and easy to learn programming language. It is known for

it’s simplicity and readability, making it a great choice for beginners. Python is

versatile and can be used for a wide range of tasks, from web development to

data analysis and artificial intelligence. It’s clear syntax and extensive library

support make it efficient and productive for software development. Overall,

Python is a powerful yet user-friendly language that is widely used in the tech

industry.

Assignment Questions

1. Declare two variables, x and y, and assign them the values 5

and 3, respectively. Calculate their sum and print the result.

2. Declare a variable radius and assign it a value of 7. Calculate the

area of a circle with that radius and print the result.

3. Declare a variable temperature and assign it a value of 25.

Convert the temperature from Celsius to Fahrenheit and print the

result.

4. Declare three variables a, b, and c and assign them the values

10, 3.5, and 2, respectively. Calculate the result of a divided by the

product of b and c and print the result.

5. Declare a variable initial_amount and assign it a value of 1000.

Calculate the compound interest after one year with an interest rate

of 5% and print the result.

6. Declare a variable seconds and assign it a value of 86400.

Convert the seconds into hours, minutes, and seconds, and print the

result in the format: "hh:mm:ss".

7. Declare a variable numerator and assign it a value of 27.

Declare another variable denominator and assign it a value of 4.

Calculate the integer division and remainder of numerator divided by

denominator and print both results.

8. Declare a variable length and assign it a value of 10. Calculate

the perimeter and area of a square with that length and print the

results.