f-strings in Python | Python Tutorial - Day #28

preview_player
Показать описание
Python is one of the most demanded programming languages in the job market. Surprisingly, it is equally easy to learn and master Python. This python tutorial for absolute beginners in Hindi series will focus on teaching you python concepts from the ground up.

python, C, C++, Java, JavaScript and Other Cheetsheets [++]:

►Learn in One Video[++]:

►Complete course [playlist]:

Follow Me On Social Media
Comment "#HarryBhai" if you read this 😉😉
Рекомендации по теме
Комментарии
Автор

🎉Merry Christmas to all python learners🎉

CodeWithHarry
Автор

7:46
You can print it as it is without writing f before double quotes like this:
print("We use f-strings like this: Hey my name is {name} and I am from {country}")

The output will be same as:
print(f"We use f-strings like this: Hey my name is {{name}} and I am from {{country}}")

khizrshaikh
Автор

Day6 of #100DaysOfCode. Today in this video 28, I learned about string formatting in Python using the format method and f-strings. The format method allows for more precise control over the formatting, such as specifying the number of decimal places. F-strings, introduced in PEP 498, provide a convenient way to embed Python expressions directly inside string literals for formatting. By prefixing a string with 'f', it becomes an f-string, making it easier to interpolate variables and expressions.
Thank You Harry Bhaiya.

debasishbesra
Автор

"This Python Course is Helpful"
-Who remember This Line of Harrry Sir

Vishavpreet
Автор

7:43
to show as it is just remove f
print(f"hey my name is {name} and i am form {country}")
like this
print("hey my name is {name} and i am form {country}")

Atharva-Shinde
Автор

7:37 But Harry Bhai, if we want to print the string as it is without replacing the identifiers with corresponding values, we could simply remove that *"f"* before the string which will turn the f-string into a normal string

YessajiRao
Автор

Jo sab log paise lekar bhi nahi sikhte
Vo Harry Bhai free me sikha rahe he
Keep it harry Bhai
And guys please share harry bhai's chanale as well as posible.

Subanbanu_Pathan
Автор

question = ["Which country has largest army in the world ?", "Which country has fastest growing economy in the world", "Which country has maximum number of time zones? "]

answer = ["China", "India", "Russia"]
que1 = print(question[0])
ans1 = input()

if ans1 == answer[0] :
print("Your answer is correct you have won 10, 00, 000 rupees")
que2 = print(question[1])
ans2 = input()

if ans2 == answer[1]:
print("Your answer is correct you won 1, 00, 00, 000 rupees")
que3 = print(question[2])
ans3 = input()

if ans3 == answer[2]:
print("You won the game and you earn 7, 00, 00, 000 rupees")
else :
print("Sorry you loss the game")

else:
print("Sorry you have earn zero rupees and you disqualified ")



else:
print("Sorry you have earn zero rupees and you disqualified ")

nishantchaudhary
Автор

I listened about this channel from a multi millionair stock trader of DELHI. then i seached this. and by GOD's grace i recalled my old days of 2003 when i learned my C, C++, C# from NIIT.

profittohoga
Автор

Practice Questions for this exercise:

1. Create a program that asks the user to enter their name and their age. Print out a message addressed to them that tells them the year that they will turn 100 years old.
2. Write a program that calculates the area of a rectangle. Prompt the user for the length and width, then display the result using an f-string.
3. Develop a simple currency converter program. Ask the user for an amount in USD and convert it to euros using a fixed conversion rate. Display the result using an f-string.

thanks,
faceSense

FaceSenseAustralia
Автор

f-strings are quite like Template Literals of JavaScript

paulaneesh
Автор

date 28 done, THANKS A LOT BROHTER, so much help ful each singe day of you're lecture

tanvirgsm
Автор

#Harrybhai
One day I'll definitely meet you bhai 🤘

jaiminbariya
Автор

Thankyou sir... I'm doing this course in April and my aim is to complete 10 videos everyday to get this course done in 10 days... it's the 3rd day and I'm just 2 videos away from today's goal... thank you so much sir this course is so helpful and I can imagine how much I will be changed after the completion of this course regarding my programming skills...again thank you ❤️❤️

anonymous-ssyc
Автор

a=int(input("enter the hour"))
if a==0 and a<12:
print("good morning")
elif a==12 and a<18 :
print("good afternoon")
elif a>=18 and a<=24:
print("good night")
else:
print("your given hour is wrong")
sir i want to ask this is wrong or correct
of given exercise 2

fact.
Автор

Present sir 😁
After a trip of 1 week I got 7 backlogs in this program....
Backlog 4/7 completed

abhinav
Автор

Harry sir please make a video about ChatGPT. How to use ChatGPT for earning purpose

shahidaslam
Автор

00:01 Python provides string formatting to place variables inside strings conveniently.
01:07 Using f-strings to format strings in Python.
02:16 f-strings in Python for easy and convenient string formatting
03:08 Python f-strings allow easy string formatting with variables.
04:10 Formatting floating point numbers with f-strings.
05:24 F-strings allow easy formatting of strings with variables
06:37 Using f-strings to insert variables into strings
07:36 Using double curly brackets to display curly brackets in f-strings.
Crafted by Merlin AI.

HardikPareta
Автор

#Day28
#100DaysOfCode
No day missed yet.

proudtobeindian
Автор

#Day28
#Present
#CodeWithHarry
#PythonChallenge
Watching after 1 day
...was busy because of school exam preparation.

KoushikDas