Saturday 16 March 2024

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.

0 Comments:

Post a Comment

Popular Posts

Categories

AI (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (115) C (77) C# (12) C++ (82) Course (62) Coursera (178) coursewra (1) Cybersecurity (22) data management (11) Data Science (91) Data Strucures (6) Deep Learning (9) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (5) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (44) Meta (18) MICHIGAN (5) microsoft (3) Pandas (3) PHP (20) Projects (29) Python (747) Python Coding Challenge (202) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses