Python- Day 1

Nidhi Ashtikar
2 min readJul 11, 2024

--

Download Python

Note: While Installing, check the box that says “Add to Path” This will add an environmental variable automatically.

To Check if the install

python

print("hello")

input

input("What is your name?")

print("Hello " + input("What is your name?"))

>>
What is your name?Nidhi
Hello Nidhi

variable

#To print name stored in variable

name = input("What is your name?")

print("Hello " + name)

#To print length

length = len(name)
print(length)

# Our Code

name = input("What is your name?")
length = len(name)
print("Hello " + name)
print(length)

>>
What is your name?Nidhi
Hello Nidhi
5

Note: Variable holds the latest value in the code

PROJECT 1: Welcome to Band Generator

print("Welcome to Band Generator")

name = input("What is your city name?\n")
pet = input("What is your pet name?\n")

print("You Band name is " + name + " " + pet)

>>

Welcome to Band Generator
What is your city name?
CA
What is your pet name?
Drogo
You Band name is CA Drogo

If you found this guide helpful then do click on 👏 the button.

Follow for more Learning like this 😊

If there’s a specific topic you’re curious about, feel free to drop a personal note or comment. I’m here to help you explore whatever interests you!

Thanks for spending your valuable time learning to enhance your knowledge!

--

--

Nidhi Ashtikar
Nidhi Ashtikar

Written by Nidhi Ashtikar

Experienced AWS DevOps professional with a passion for writing insightful articles.

Responses (1)