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}}")
@rolitiwari8802 Жыл бұрын
Yeah exactly bro. ❤
@Shrenkstav9 ай бұрын
Yes you are right but Harry is trying to show that how to print along with curly brackets while using f-strings.😃
@debasishbesra2901 Жыл бұрын
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.
@aryyann054 ай бұрын
bro did you complete the course or not?
@UVtech00012 ай бұрын
😂😂@@aryyann05
@FaceSenseAustralia Жыл бұрын
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
@rejuantamim6939 Жыл бұрын
where i can get more problems like these?
@Top.Trending27 ай бұрын
You can provide solution???
@navneetpathrabe94846 ай бұрын
1.Answer name = input("Enter your name: ") age = int(input("Enter your age: ")) print(f"{name} will turn 100 years in {100 - age}") base = float(input("Enter base: ")) height = float(input("Enter height: ")) Area_Of_Rectangle = base * height print(f"Area of rectangle is: {Area_Of_Rectangle} ") dollar_amount = float(input("Enter amount in dollars: ")) conversion_rate = 0.92 euro_amount = dollar_amount * conversion_rate print(f"The converted amount is: €{euro_amount:2f}")
@minahiljilani50426 ай бұрын
@@navneetpathrabe9484 hlo i want to print my name and my frnd name for 3 time if it above three time then loop will b terminated how i can solv
@HardikPareta6 ай бұрын
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.
@Vishavpreet1232 жыл бұрын
"This Python Course is Helpful" -Who remember This Line of Harrry Sir
@shreyanshitilwari22 Жыл бұрын
Meeeeeeee3ee!!!
@Subanbanu_Pathan2 жыл бұрын
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.
@nishantchaudhary6361 Жыл бұрын
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 ")
@profittohoga40784 ай бұрын
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.
@YessajiRao Жыл бұрын
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
@abhimanyukarkara4218 Жыл бұрын
I thought of the same
@rushexxoff Жыл бұрын
but in real programs you have to use f string generally with those {} brackets in use also so that is why it is helpful
@paulaneesh72 жыл бұрын
f-strings are quite like Template Literals of JavaScript
@ZeshanMukhtar12 жыл бұрын
Yeah 😊
@GijutsuTech6 ай бұрын
thats what i was thinking
@Atharva-Shinde7 ай бұрын
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}")
@biswajeet98265 ай бұрын
One of the most Underrated Channels out there!!
@tajinder7152 жыл бұрын
whoooooooooooooooo ⚜
@abuhamid35412 жыл бұрын
Bahoot jyada
@RamandeepKaur-iy1dj2 жыл бұрын
Me also
@levi-072 жыл бұрын
Haa ye krlo pehle 😄
@chainsawman-ilia2 жыл бұрын
Bro even I am 😭
@tajinder7152 жыл бұрын
@@levi-07 keyboard vi thanda lag raha hai😂😂😂😂😂😂
@tanvirgsm2 ай бұрын
date 28 done, THANKS A LOT BROHTER, so much help ful each singe day of you're lecture
@jaiminbariya8830 Жыл бұрын
#Harrybhai One day I'll definitely meet you bhai 🤘
@MuhammadRafay-we9nc8 ай бұрын
Python is best programming language
@RajNamdev_19 Жыл бұрын
LOVE YOU HARRY BHAI❤
@motivational_hub0064 ай бұрын
intresting
@vashisththakar26955 ай бұрын
Day -28 Done
@abhinav5786 Жыл бұрын
Present sir 😁 After a trip of 1 week I got 7 backlogs in this program.... Backlog 4/7 completed
In this video 8:20 time we can also delete the 'f' outside the double quotes to show calibrates with the parameter name, like print("My name is {name} and I am from {country}")
@krishgaikwad6108 Жыл бұрын
yup, thats what i thought too !!!
@mathocity8337 Жыл бұрын
Beside printing {something}, what if you also want to print a variable in the same string? i.e. name = "Random" print (f"My name is {name} and I'm from {{country}}") In this case, you just can't remove f" " cuz you want to print {name} too.
@arohi_3033 ай бұрын
Day 28✨
@chainsawman-ilia2 жыл бұрын
Best topic fstrings The thing I want in c++ so much
@Vignesh-y4j4 ай бұрын
28th one!!
@man_united-z1h6 ай бұрын
Day 28 done ✅
@deadlygamer4692 Жыл бұрын
print("Welcome ladies and gentlemen to Kaun Banega Crorepati first question for 7 crore on your computer screen is ") q = ["How many colours are there in a rainbow?","(a)2 (b)5 (c)7 (d)8"] print(q) a = str(input("Enter the correct answer = ")) ans1 = "c" ans2 = "7" ans3 = "seven" ans4 = "Seven" ans5 = "C" if (a== ans1 or a==ans2 or a==ans3 or a==ans4 or a==ans5) : print("Congratulations!,You win 7 crore.") else : print("Sorry answer is wrong.")
@KoushikDas2005 Жыл бұрын
#Day28 #Present #CodeWithHarry #PythonChallenge Watching after 1 day ...was busy because of school exam preparation.
@biswajeet98265 ай бұрын
You deserve the best in Life!!
@shahidaslam99682 жыл бұрын
Harry sir please make a video about ChatGPT. How to use ChatGPT for earning purpose
@jatinbhatt22222 жыл бұрын
Present Sir on Day-28 ✋✋
@proudtobeindian18942 жыл бұрын
#Day28 #100DaysOfCode No day missed yet.
@adityapradhan8474 Жыл бұрын
Majja aa raha hai harry bhai Python se to pyaar sa hogya hai
@mdsohanurrahmanhridoy13432 жыл бұрын
Completed day#28 challenge...😍
@Radhe_radhe29292 жыл бұрын
Day 28 🔥
@JoyBoy_013 Жыл бұрын
Great Harry bhai
@eashovon2 жыл бұрын
Present from Bangladesh Brother.....#day28 Done
@haribaba2408 Жыл бұрын
Maja aara sekhne me 😊
@Abhinaw_singh35492 жыл бұрын
merry Christmas harry bhai🎅🎅
@Karna-Sinjali Жыл бұрын
Question = ("What is the capital city of Nepal") O1 = ("Kathmandu") O2= ("Pokhera") O3 = ("Jhapa") O4 = ("Nepaljung") option = [O1, O2, O3, O4,] print(option) money = 000 add = money + 1000 answer = O1 if answer in option: print("yes,You won the NRs 1000") print("Your total money is :", add) else: print("No, You lose money")
@FaceSenseAustralia Жыл бұрын
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.
@Smilefrominsight11 ай бұрын
@@FaceSenseAustralia !✨🤩
@thatcoolkid3702 жыл бұрын
Day #28 in 100DaysOfCode. Thanks, harry bhai for this Christmas gift(100DaysOfCode).
@niteshch91662 жыл бұрын
Present Harry Sir!
@anonymous-ss8yc Жыл бұрын
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 ❤️❤️
@PHros Жыл бұрын
Mera bhi aisa same goal tha lekin ab me 20-30 aik din me kar raha hoon
@anonymous-ss8yc Жыл бұрын
@@PHros good bro
@TopRTelugu Жыл бұрын
finished?
@anonymous-ss8yc Жыл бұрын
@@TopRTelugu unfortunately no bro.. i was busy in doing college things.. I'll continue soon after my sessionals get over.. it's a vast thing and so it is important to learn all modules separately.. first build basic understanding of all modules and then take lectures and then practice for better results.. reply on this comment when you complete the whole course.. good luck
@shivamchaudhary85922 жыл бұрын
#Day28 Present Sir
@Trickyonline-tp9oe2 жыл бұрын
Day 28 done!
@Radhe_radhe29292 жыл бұрын
Merry Christmas bhaiya ❤️🔥🔥👍💥⛄⛄
@geekytutorials57458 ай бұрын
Thanks bhaiya ❤
@forexspectrum4799 Жыл бұрын
superb brother
@CoderzGaming0932 жыл бұрын
#day28 merry Christmas harry bhai🎅🎅
@biswajeet98265 ай бұрын
Thanks a lot Sir!!
@Krishna404572 жыл бұрын
#Day28
@simple36882 жыл бұрын
💖 Merry ⛄ Christmas 💖⛄ Bro 😘
@pritam04z Жыл бұрын
Present sir 🙏🙏
@fact45.2 жыл бұрын
a=int(input("enter the hour")) if a==0 and a
@Berojgar.gyanii9 ай бұрын
Good 💯 your code is correct!!
@Manish-qt1bz2 жыл бұрын
Present Sir 🔥
@vjournalbytej983211 ай бұрын
Present Sir 🤚
@meditationmusic64822 жыл бұрын
Thanks sir.
@yatindrapabbati68782 жыл бұрын
Day28-PRESENT SIR!
@TalhaTariq-i2e8 ай бұрын
Nice👍
@FunFACT1233111 ай бұрын
day 28 completado stoico
@tonykrafton2205 Жыл бұрын
Present ! Day 28
@__Atif_7190 Жыл бұрын
I create it Because for solving doubts
@sangitadutta3623 Жыл бұрын
#CodeWithHarry Sir I have started your 100 days of coding . Here's my ans questions = ["Whats color of crow ? ","a> Blue", "B> Black", "c> Red", "D> all of the above"] print("Welcome to KBC \t Let's start the GAME") key = input("Press 'y' if Yes") # print(type(key)) if str(key) == "y": print(' '.join(questions)) answer = input("Please select option ") if str(answer) == "B": print(" You Won Rs 50000") else: print("Wrong ans") else: print("Do you want to Exit")
@vireshs-iy1um Жыл бұрын
Hype dude, u did quite a mistake in 6th line u have to remove this line " : join " coz it returns an error
@darkshadow8414 Жыл бұрын
questions = ["Whats color of crow ? ","a> Blue", "B> Black", "c> Red", "D> all of the above"] print("Welcome to KBC \t Let's start the GAME") key = input("Press 'y' if Yes") # print(type(key)) if str(key) == "y": print(' '.join(questions)) answer = input("Please select option ") if str(answer) == "B": print(" You Won Rs 50000") elif answer=="a print("no this is incorrect") else: print("try again") else: print("Do you want to Exit")
@darkshadow8414 Жыл бұрын
bro i really don't understand f strings can you teach me on easy way
@Aditya_Vyas Жыл бұрын
Day 28 of Coding. Present Sir.
@dharvikop2 жыл бұрын
Day 28 done
@deekshithaparasu Жыл бұрын
#day 28 completed
@only_sanatan2 жыл бұрын
ready to watch the legend's video
@UnderGamer_Official2 жыл бұрын
Sir please kivy & kivymd tutorial
@Nuvora.OFFICIAL2 жыл бұрын
Present Sir!
@ekanshsharma6256 Жыл бұрын
8:16 we can simply remove f from the starting🤣😂
@junaidtanveer71912 жыл бұрын
nice harry bhai
@sachinkumarsharma64832 жыл бұрын
Day_28 Present Sir
@tusharkaushik54602 жыл бұрын
Please make a course on unity too
@anonymousbruh92462 жыл бұрын
BRo he is mainly Focused on web dev and high level programming languages. Check out bRackeyes course on yt
@satyampandey-fx8gz2 жыл бұрын
#daaay28 consistency maintain 20:53 25/12/2022
@MahadKhan8732 жыл бұрын
Imagine getting ultimate course Web development 2023🤦🏻🥰
@vaibhavnayak3416 Жыл бұрын
?
@MahadKhan873 Жыл бұрын
@@vaibhavnayak3416 what?
@NEERAJ-dw9bt10 ай бұрын
Present sir 🤚
@makripon Жыл бұрын
Why need to print example of f-string inside f-string. simply remove f of begining. I printed this - This is how to create F-String: write variable name inside curly bracket like {variable-name} and put a f at begining. For example, f"my name is {firstName} {lastName}" using this - print('This is how to create F-String: write variable name inside curly bracket like {variable-name} and put a f at begining. For example, f"my name is {firstName} {lastName}"' )
@kartiksandhu29574 ай бұрын
Harry bhai ye program run n ho rha hai Mera help kro do
@kunalgurav81942 жыл бұрын
Present sir wish you merry Christmas 💝⛄
@Mr.Kaushik2 жыл бұрын
thanks bhai
@anikshaha30242 жыл бұрын
Merry chrismas harry vai
@jyotikale5342 жыл бұрын
thanks sir
@theanonymous92 Жыл бұрын
28th day done... bit late but, Done
@qzarmy7059 Жыл бұрын
I am present bhaiya ❤
@AkashSingh-xf6bd Жыл бұрын
f-string work like a string literal in JavaScript
@DevanshNautiyal-iy6so3 ай бұрын
#Koun Banega Karo pati print() print("Welcome to the quiz program") print("There will be a 5 Question displaying on your screen one after one") print("Give answer according to the order") print("For every correct answer you will gain a point") print() a = input("Read the instructions and press any Enter to start") Question = ["Who developed Python Programming Language"," Which type of Programming does Python support","Is Python case sensitive when dealing with identifiers"," Which of the following is the correct extension of the Python file", " Is Python code compiled or interpreted"] Options1 = ["a) Wick van Rossum", "b) Rasmus Lerdorf", "c) Guido van Rossum", "d) Niene Stom",] Options2 = ["a) object-oriented programming", "b) structured programming", "c) functional programming", "d) all of the mentioned"] Options3 = ["a) no", "b) yes", "c) machine dependent", "d) none of the mentioned"] Options4 = ["a) .python", "b) .pl", "c) .py", "d) .p"] Options5 =["a) Python code is both compiled and interpreted", "b) Python code is only compiled", "d) Python code code is neither compiled nor interpreted", "c) Python is only interpreted"] for qs in Question: print(qs) if qs == Question[0]: for i in Options1: print(i) op = input("Enter your option: ") if op == "c" or op == "(c)" or op == "c)"or op == "Guido van Rosseum": input("Your answer is Correct ! Click enter ") else: print("Wrong answer") break elif qs == Question[1]: for i in Options2: print(i) op = input("Enter your opetion: ") if op == "d" or op == "(d)" or op == "d)"or op == "all fo the mentioned": input("Your answer is Correct ! Click enter ") else: print("wrong answer") break elif qs == Question[2]: for i in Options3: print(i) op = input("Enter your opetion: ") if op == "b" or op == "(b)" or op == "b)"or op == "yes": input("Your answer is Correct ! Click enter ") else: print("wrong answer") break elif qs == Question[3]: for i in Options4: print(i) op = input("Enter your opetion: ") if op == "c" or op == "(c)" or op == "c)"or op == ".py": input("Your answer is Correct ! Click enter ") else: print("wrong answer") break elif qs == Question[4]: for i in Options5: print(i) op = input("Enter your opetion: ") if op == "d" or op == "(d)" or op == "d)"or op == "Python is only interpreted": input("Your answer is Correct ! Click enter ") else: print("wrong answer") break
@__ayu2 жыл бұрын
#DAY28 COMPLETED THANK YOU #CodeWithHarry
@thor42762 жыл бұрын
Kya baat hai guru jii
@tombyter5 ай бұрын
present
@know_about_cricket632 жыл бұрын
harry bhai turtle module bhi sikhaoge kya??
@statusmaster57592 жыл бұрын
Hello Bhai mera question ye h ki majority mere friends k pss window laptop h... Me MacBook lena chahta hu but dikkat ye h ki window and MacBook me connectivity me issues naa aaye kahi data share yaa kuch orr process me 🤔🤔🤔 plzz bhai is topic par video bana do and sare MacBook ko compare karke konsa kiske liye sahi rahega bataiye 🙏🙏🙏
@Fun-xz5zd2 жыл бұрын
I'm present.
@Keepitshort4172 жыл бұрын
present sir from Pakistan tharparkar
@rahuljoshi23603 ай бұрын
Replit ki new policy ki wjah se or repls create nhi ho rhi :(