Python 100 days challenge : Day-1

·

2 min read

Python 100 days challenge : Day-1

This is my journey in python program learning. I would like to keep track of the learnings that I do on daily basis. I wish this might help someone to start their journey.

Python short Intro: Python is one of the programming languages designed for easy readability. Python has syntax similar to English which makes us write & read very easily. Python is used in the front end, backend, automation, data science, etc.

Front end : Web development, Tools, etc.

Backend : Database connectivity, server connectivity, API(application programming development) etc.

Automation : To automate routine activities that we perform on day to day basis.

Data science: To predict the feature outcome based on the available data.

Python is a dynamically typed language: which means, we no need to declare variable types. Python also takes care of memory management.

Dynamically typed example:

name ="ram" 
age =50

above, we have taken name and age variables. However, we did not declare whether they are integers or strings. Python by default will be assigning the variable type based on the value. In python, we need not end the line with , ; if we want to end the line, just press enter.

Same in C language:

char name ="ram";
int age =0;

Let's jump into programming:

Functions: Functions are designed to perform specific tasks. For example, car functionality is to take us somewhere, and cell phone functionality is to make a call.

let's start with the "Hello world" program, to print hello world, we will be using print function

print() function: : is used to print on to console

print("Hello world")

always use .py to save the program. ex: Hello_World.py use anyone of python compilers to run this program.

output: Hello World

as we know how to print value into the console, let us take another function that takes inputs from the console

input() function: is used to take input from console:

input("what's your name")

To print input value into the console, we can use the print() function.

print(input("whats your name"))

if you observe in the above code, we are using two functions. First, the input function will be called then the print function will be called.

image.png

I have entered input as John and in the next line, it's printed John as output.

The functions that we have seen above are python built-in functions.

pls click here to see built-in funtions