🔥Finding it Damn Hard to Understand Python? Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT! Try Programiz PRO for Free: bit.ly/interactive-py
i love the way he is teaching it. i knew nothing about python a day ago, and now i know many things about it, only watching these videos. Great work👍👌. Thank you Programiz!!!!
@@SugoiTots kilometer_travelled = int(input('enter the kilormeters travelled : ')) kilometer = 1 miles = 0.621371 kilometer = miles miles = miles*kilometer_travelled print('miles travelled is',miles)
I am in class 10th learning python for my new subject AI(Artificial Intelligence) and I often learns from this channel and since my laptop is of old version his website helps me to use, compile the python programming thank you so much
I just started learning programming and have been through numerous tutorials and videos scouring the internet for something that's in depth and will teach me what I need to know and go into detail. This Programiz course is the only one that's teaching the basics like they need to be taught. Thank you, good sir, looks good on ya!
hey ! your video helped me alot ! i created the converter of km to miles ! it was just out of the world felling when code worked well ! thanx alot guys .........and those who are still trying ...dont worry you are better than me :D
Great Video tutorial, Also discusses some practice questions at end which helps in practice, I hope this practice of assignments will be continued in future topics as well.
Thank you! We are glad you loved our Python tutorials along with our practice questions at the end that you found helpful. We will try to continue that in the future as well.
Learning Python is something you would like to get in your skills, but you do not know where to start? This NEW channel will help you out leaning Python Programming from scratch - for complete Beginners, Intermediate and Advanced Levels
11:00 I could be wrong but I don't think the parentheses is only to make code more readable. BODMAS means the brackets can affect the result. For example: 34 * (5 -15) = *-340* 34 * 5 - 15 = *155*
Yeah, parentheses are not the only way to make our code more readable. However, there are certain situations where it's better to use parentheses. For example, 5 - 15 % 3 = 3 It may not be apparent here which operator runs first. In such cases, we can use parentheses. 5 - (15 %3) = 3 By the way, the order of execution of operators is determined by the "precedence and associativity of operators". If you want to learn more about it, you can check this article: www.programiz.com/python-programming/precedence-associativity
distance_in_km = float(input('enter the distance in km =')) distance_in_miles = distance_in_km *0.6213171 print("the distance in miles is ",distance_in_miles)
kilometer = int(input("input the distance covered in kilometers: ")) miles = kilometer * 0.621371 print("miles covered is equal to {} miles".format(miles))
to find the amount of fees after discount in dynamic form is : a=float(input("enter the amount of fee:")) b=float(input("enter the amount of discount:")) c=(b/100)*a d=a-c print("the total amount of fee should be payed includind discount will be :",d)
km = int(input("Enter kilometer: ")) convert = (km * 0.621371) print(km, "km converted into miles is:" , convert) My code for the km to miles converter. P.S I'm just 13 and tryna get into coding so don't bully me if my code is bad 😶
print("I have to pay $",4535*0.9," in tuition fees for the next semester", sep="") #or print(f"I have to pay ${4535*0.9} in tuition fees for the next semester") Yeah, it's not dynamic, and hard coded, but also easier and faster. For km, just do the basic input + int cast km, then multiply that amount by 0.6whatever and you have your miles.
km_travelled=float(input('Enter the distance travelled :)) km=1 miles=0.621371 km=miles miles=km_travelled*km print("distance in kilometers to miles is:", miles) O/p- Enter the distance travelled:564.5 distance in kilometers to miles is:350.7639395
I have a question, I have created an operator as a button and placed it on my custom panel, but now I want to know if the button is pressed. I don't know how would I do that. Any example?
i hope this is ok thank you for your tutorials !! distance_km = 564.5 kilometer = 0.621371 distance_miles = kilometer * distance_km print(distance_miles)
#Converting distance in km into miles Distance_in_Kilometres=int(input('Enter the distance in km: ')) Distance_in_Miles=Distance_in_Kilometres*0.621371 print('Required distance is ',Distance_in_Miles,'miles')
Thank you! We appreciate your thoughts. It really helps us to keep going and delivering the best videos for learning Python. Due to some technical issues and ongoing lockdown, the 4th video in the series is delayed. We will upload the video soon. Stay tuned :)
I hope this is ok! Thank you for your lessons! These are so helfpul! >>> distance_km=564.5 >>> #1 km=0.621371 miles >>> distance_miles = 564.5 * 0.621371 >>> print(distance_miles) 350.7639295
Your code works, however, you have haven't made the use of distance_km variable. Something like this: distance_km = 564.5 km_miles_ratio = 0.621371 distance_miles = distance_km * km_miles_ratio print(distance_miles)
is that correct program? let me know if i wrong and give me the feedback a=0.621371 b=float(input("Enter the distance number in kilometeres:")) miles=b*a print("You have reach",miles,"miles")
Nice. Your solution is correct. I have a suggestion though. Try to give descriptive variable names instead of a and b. Something like km_miles_ratio, distance_km etc.
#program to convert km into miles kilometer = float(input("enter the kilometer to convert it into miles:")) # 1km equals 0.621371 miles Miles = (kilometer * 0.621371) print("The entered kilometer in miles:", Miles)
kilometer_travelled = int(input('enter the kilormeters travelled : ')) kilometer = 1 miles = 0.621371 kilometer = miles miles = miles*kilometer_travelled print('miles travelled is',miles)
can u tell me how to do the question u asked the kilometer to miles. please i am not getting it and i cant find the thing where you told the answer was pls
Hello Jayashree, You can find the answer using the link on the video description. Just follow the link under "Programs in this video" section and click on it. Our github page will open up where you can scroll to the bottom of the page to view the answer.
distance_kms = input("Enter distance in Kilometers:") distance_miles = (distance_kms / float(1.609)) print("Distance in miles: ", distance_miles) Tried to write a script which returns the value in miles and accepts user input, but its not working.
It's because the input() function takes input in string format. You need to change it to a number before you can perform arithmetic. Something like this: distance_kms = float(input("Enter distance in Kilometers: "))
My code is better as it transfers any number in kilometers into miles instead of only 564.5 '''This Program Converts Kilometers into Miles''' km_distance_input = float(input("How long is the distance in kilometers?:")) conversion = km_distance_input * 0.621371 print("From KM to MILES it is:", conversion, "miles")
#Addition print(" ADDITION ") x = input("Enter First Number") y = input("Enter Second Number") print("The Answer Is", x + y ) . . when i execute this code, the thonny ide and the programiz Online Python Compiler add the number like (2+2=22) and not (2+2=4) i can't understand where the problem is.... Can any one pleaseeeee help me ..........
You are getting this error because python initializes its input values as string type. Hence, when you add strings, you concatenate them and thus, you are getting 2+2=22 Try converting them into integer type by introducing x = int(input("Enter First Number")) y = int(input("Enter Second Number")) print("The Answer Is", x + y )
Great video, thanks again. In 8:59 - How about writing - "discount = 10/100" - except for "discount_percent = 10"? I got the same answer after running the program. Have I done anything not right?
Sorry if I'm wrong, I'm new to this but... Can you do the tuition in four lines instead of five? fee = 4535 discount = fee / 10 discounted_fee = fee - discount print(discounted_fee) And this for the task: distance_km = 564.5 mile = 0.621371 distance_miles = distance_km * mile print(distance_miles)
# Taking input of kilometer km = int(input("Enter the number in km: ")) # 1km = 0.631371 miles mile = 0.621371 # Multiplying the values ans = int(km) * mile # Printing the answer print("The Answer is: ", ans) . . . code to convert km to miles;)
"""THIS PROGRAM TO FIND A DISTANCE IN KILOMETER TO CONVERT IT TO MILES""" Distance_kilometer=250 per_Kilometer=0.621371 DISTANCE_MILES=Distance_kilometer*per_Kilometer print("a distance in kilometer to miles for 250 kilometer is",DISTANCE_MILES) SIR I RUN THIS PROGRAM IT IS CORRECT OR WRONG SIR
Hi Almaan, we are posting our while loop video next week. Please stay tuned. For the time being, you can go to our website to learn more about Python for and while loops.
10:07 it was easy ;) distance_km = float(input("km:")) # 1 km = 0.621371 miles distance_miles = distance_km * 0.621371 print(distance_km ,"km =",distance_miles,"miles") just copy paste the code
🔥Finding it Damn Hard to Understand Python?
Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
Try Programiz PRO for Free: bit.ly/interactive-py
Due to some technical issues and ongoing lockdown, the 4th video in the series is delayed. We will upload the video soon.
Upload soon sir 🙏
i love the way he is teaching it. i knew nothing about python a day ago, and now i know many things about it, only watching these videos. Great work👍👌. Thank you Programiz!!!!
km = input("Enter number : ")
km = int(km)
print (km, "is equal to" ,0.621371 * km)
This is the program to convert Km into miles
thanks for the help
Based on what you shared I did this
print (km, "km", "is equal to" ,0.621371 * km ,"miles")
Just to add the details :)
@@SugoiTots
kilometer_travelled = int(input('enter the kilormeters travelled : '))
kilometer = 1
miles = 0.621371
kilometer = miles
miles = miles*kilometer_travelled
print('miles travelled is',miles)
use "float" remove "int"
your c tutorials helped me a lot.
python tutorials is great.
thank you sir
for helping my career.
Thank you for your kind words. We are glad to know our tutorials were helpful for learning and are helping you build your career.
are the c tutorials online anywhere?
@@ayushidhamane9681 there is an app from them to learn C
link for android:
play.google.com/store/apps/details?id=com.programiz.learnc
I am in class 10th learning python for my new subject AI(Artificial Intelligence) and I often learns from this channel and since my laptop is of old version his website helps me to use, compile the python programming thank you so much
I just started learning programming and have been through numerous tutorials and videos scouring the internet for something that's in depth and will teach me what I need to know and go into detail. This Programiz course is the only one that's teaching the basics like they need to be taught. Thank you, good sir, looks good on ya!
hey ! your video helped me alot ! i created the converter of km to miles ! it was just out of the world felling when code worked well ! thanx alot guys .........and those who are still trying ...dont worry you are better than me :D
its * feeling* mate anyways we all make mistakes so no worries👍😜
You're a life saver. My programming teacher has a hard time explaining things.
Today I'm so happy..successfully written my first program.Thanks so much Sir #Programiz 🙏🙏..
Best python video tutorials ever...HeartfullyThank you so much sir 💓 .....
Thanks for sharing your thoughts. We are delighted to hear that our team is able to provide you with the best Python learning tutorials.
I actually love you thank you so much because I know my grades are going up after watching your series
Great Video tutorial, Also discusses some practice questions at end which helps in practice, I hope this practice of assignments will be continued in future topics as well.
Thank you! We are glad you loved our Python tutorials along with our practice questions at the end that you found helpful. We will try to continue that in the future as well.
It’s a always nice to watch your videos. I’m sure if you’re a teacher, no student will fail in your class. Kudos 👍🏾👍🏾
This series is the best thing ever. I have needed an easy and fast way to learn coding in ython. You guys are amazing and I need you to kee it u.
hey python god
how is your day goin
cuz of you here in my 12th class my day just passed like I am a hero
Learning Python is something you would like to get in your skills, but you do not know where to start? This NEW channel will help you out leaning Python Programming from scratch - for complete Beginners, Intermediate and Advanced Levels
11:00 I could be wrong but I don't think the parentheses is only to make code more readable.
BODMAS means the brackets can affect the result.
For example:
34 * (5 -15) = *-340*
34 * 5 - 15 = *155*
Yeah, parentheses are not the only way to make our code more readable. However, there are certain situations where it's better to use parentheses. For example,
5 - 15 % 3 = 3
It may not be apparent here which operator runs first. In such cases, we can use parentheses.
5 - (15 %3) = 3
By the way, the order of execution of operators is determined by the "precedence and associativity of operators". If you want to learn more about it, you can check this article: www.programiz.com/python-programming/precedence-associativity
Awesome job Programiz!! Love your videos
#convert 564.5 kilometeres to miles
distance_km = float(input('kilometers travelled:',))
kilometers_per_miles = float(1.60934) #1km = 1.609
distance_miles = ( distance_km / kilometers_per_miles)
print(distance_miles, 'Your travelled in kilometers')
distance_in_km = float(input('enter the distance in km ='))
distance_in_miles = distance_in_km *0.6213171
print("the distance in miles is ",distance_in_miles)
Best Python tutor 👍
You are my favorite teacher
# 1 km = 0.621371 miles
miles = 0.621371
distance_km = 564.5
distance_to_miles = distance_km * miles
print("564.5km to miles: ",distance_to_miles)
kilometer = int(input("input the distance covered in kilometers: "))
miles = kilometer * 0.621371
print("miles covered is equal to {} miles".format(miles))
distance = int(input('Enter the distance in km: '))
distance_in_miles = (distance * 0.621)
print('Distance in miles is :', distance_in_miles)
3:55 this part literally helped me out lmao, my dumbass have been using "^" instead of "**". Thanks a lot man!
He is very good in explaning python
to find the amount of fees after discount in dynamic form is :
a=float(input("enter the amount of fee:"))
b=float(input("enter the amount of discount:"))
c=(b/100)*a
d=a-c
print("the total amount of fee should be payed includind discount will be :",d)
By the way, you can also do x *= 5 to say x = x * 5 and also x /= 5 to say x = x / 5.
Thank you very much for this series! very helpful for the starters! :D
km = int(input("Enter kilometer: "))
convert = (km * 0.621371)
print(km, "km converted into miles is:" , convert)
My code for the km to miles converter. P.S I'm just 13 and tryna get into coding so don't bully me if my code is bad 😶
print("I have to pay $",4535*0.9," in tuition fees for the next semester", sep="")
#or
print(f"I have to pay ${4535*0.9} in tuition fees for the next semester")
Yeah, it's not dynamic, and hard coded, but also easier and faster. For km, just do the basic input + int cast km, then multiply that amount by 0.6whatever and you have your miles.
km_travelled=float(input('Enter the distance travelled :))
km=1
miles=0.621371
km=miles
miles=km_travelled*km
print("distance in kilometers to miles is:", miles)
O/p-
Enter the distance travelled:564.5
distance in kilometers to miles is:350.7639395
I have a question, I have created an operator as a button and placed it on my custom panel, but now I want to know if the button is pressed. I don't know how would I do that. Any example?
You guys are really helpful 😊 I appreciate it
km=float(input("Enter distance :"))
miles=0.621371
distance_miles=km*miles
print("Distance travelled in miles is:", distance_miles
i have done task
it's working
Thank you for the free lesson
i hope this is ok
thank you for your tutorials !!
distance_km = 564.5
kilometer = 0.621371
distance_miles = kilometer * distance_km
print(distance_miles)
to convert distance in kilometers to miles
#1km = 0.621371 miles
kilo_meters= 187
distance= kilo_meters*0.621371
print(distance)
Thanks
#Converting distance in km into miles
Distance_in_Kilometres=int(input('Enter the distance in km: '))
Distance_in_Miles=Distance_in_Kilometres*0.621371
print('Required distance is ',Distance_in_Miles,'miles')
Your codes nice :)
It only runs on whole number cause its int :)
@@SugoiTots Thanks
sir plz tell me what is use of "x" (1:20) ???
why you wrote "x" ???
why to write it ???
I'm enjoying following your videos 10/10 marks, I find them very intuitive and easy to follow, awesome job. However, Where is video #4 please? Thanks
Thank you! We appreciate your thoughts. It really helps us to keep going and delivering the best videos for learning Python.
Due to some technical issues and ongoing lockdown, the 4th video in the series is delayed. We will upload the video soon. Stay tuned :)
Distance_km = 564.5
Miles = 0.621371
Print(“564.5 Kilometers is”, distance_km*mikes, “miles”)
The answer to the task
Km=int(input("Enter "))
print(" miles is" , Km * .621371)
I love you man
Awsome teaching
great tutorial and easy to follow
Use to understand
I hope this is ok!
Thank you for your lessons! These are so helfpul!
>>> distance_km=564.5
>>> #1 km=0.621371 miles
>>> distance_miles = 564.5 * 0.621371
>>> print(distance_miles)
350.7639295
Your code works, however, you have haven't made the use of distance_km variable. Something like this:
distance_km = 564.5
km_miles_ratio = 0.621371
distance_miles = distance_km * km_miles_ratio
print(distance_miles)
@@programizstudios oh...thank you!!! 😁
is that correct program? let me know if i wrong and give me the feedback
a=0.621371
b=float(input("Enter the distance number in kilometeres:"))
miles=b*a
print("You have reach",miles,"miles")
Nice. Your solution is correct.
I have a suggestion though. Try to give descriptive variable names instead of a and b. Something like km_miles_ratio, distance_km etc.
Excuse me sir
5 ** 2 = 25 ❓
5 ** 2 = 125 is it wrong?????
I can't understand
what is the operator " ^ " use????
awesome tutorial
too good
nice explanation
distance_km = int(input())
distance_mile = km * 0.621371
print(distance_mile)
This would throw back an error
I kinda don’t like there app but I like the videos
#program to convert km into miles
kilometer = float(input("enter the kilometer to convert it into miles:"))
# 1km equals 0.621371 miles
Miles = (kilometer * 0.621371)
print("The entered kilometer in miles:", Miles)
Bro where is your 4th video
We are sorry but due to some technical issues and ongoing lockdown, the 4th video in the series is delayed. We will upload the video soon.
@@programizstudios ok we can understand
kilometer_travelled = int(input('enter the kilormeters travelled : '))
kilometer = 1
miles = 0.621371
kilometer = miles
miles = miles*kilometer_travelled
print('miles travelled is',miles)
I don't understand from where 567.5 came in the programming test because it isn't in the question "_"
can u tell me how to do the question u asked the kilometer to miles. please i am not getting it and i cant find the thing where you told the answer was pls
Hello Jayashree,
You can find the answer using the link on the video description. Just follow the link under "Programs in this video" section and click on it. Our github page will open up where you can scroll to the bottom of the page to view the answer.
miles=0.62137
km=25
kim=km*miles
print(km," kilometres in miles:",kim)
distance_kms = input("Enter distance in Kilometers:")
distance_miles = (distance_kms / float(1.609))
print("Distance in miles: ", distance_miles)
Tried to write a script which returns the value in miles and accepts user input, but its not working.
It's because the input() function takes input in string format. You need to change it to a number before you can perform arithmetic. Something like this:
distance_kms = float(input("Enter distance in Kilometers: "))
My code is better as it transfers any number in kilometers into miles instead of only 564.5
'''This Program Converts Kilometers into Miles'''
km_distance_input = float(input("How long is the distance in kilometers?:"))
conversion = km_distance_input * 0.621371
print("From KM to MILES it is:", conversion, "miles")
There are many approaches when it comes to solving :)
Yours is one of them :)
Thank you for sharing.
@@SugoiTots thanks for replying and yes that's true:)
distance_km=564.5
distance_mile=0.621371
distance_in_mile =(distance_km*distance_mile)
print(distance_in_mile)
My program for the task:
km = int(input("Enter KM: "))
miles_distance = (km * 0.621371)
print("Km to miles is: ", miles_distance)
but shouldn't you use float instead of int?
Sir please teach tkinter
#Addition
print(" ADDITION ")
x = input("Enter First Number")
y = input("Enter Second Number")
print("The Answer Is", x + y )
.
.
when i execute this code, the thonny ide and the programiz Online Python Compiler add the number like (2+2=22) and not (2+2=4) i can't understand where the problem is....
Can any one pleaseeeee help me ..........
You are getting this error because python initializes its input values as string type. Hence, when you add strings, you concatenate them and thus, you are getting 2+2=22
Try converting them into integer type by introducing
x = int(input("Enter First Number"))
y = int(input("Enter Second Number"))
print("The Answer Is", x + y )
@@vedangranmale2865 thankyou for the answer🥰🥰....but i already got the solution from programiz website...
Isn't there a hierarchy of operators in python like it is in C language?
Great video, thanks again.
In 8:59 - How about writing - "discount = 10/100" - except for "discount_percent = 10"? I got the same answer after running the program. Have I done anything not right?
nah bro you haven't , its just you have written the variable data early , he wrote the variable 10 just to make it eazy to understand
distance_km =564.5
#1_km = 0.62 miles
distance_miles = (distance_km / 0.62)
print(distance_miles)
Your explanation is amazing!❤
This is wrong. The correct form is (distance_km * 0.621371)
wait................................ so how does x=x+10 work(illegal equation)
How can I calculate a square root?
Sorry if I'm wrong, I'm new to this but...
Can you do the tuition in four lines instead of five?
fee = 4535
discount = fee / 10
discounted_fee = fee - discount
print(discounted_fee)
And this for the task:
distance_km = 564.5
mile = 0.621371
distance_miles = distance_km * mile
print(distance_miles)
How to make web on computer to use pythan
I got the answer.
The answer was 350.7639295 miles. Am I write??????
# 1 KILOMETRE = 0.621371 MILES
distance_km = 564.5
miles = 0.621371
km_to_mile = (distance_km*miles)
result=(km_to_mile)
print(result)
# Taking input of kilometer
km = int(input("Enter the number in km: "))
# 1km = 0.631371 miles
mile = 0.621371
# Multiplying the values
ans = int(km) * mile
# Printing the answer
print("The Answer is: ", ans)
.
.
.
code to convert km to miles;)
😀
"""THIS PROGRAM TO FIND A DISTANCE IN KILOMETER TO CONVERT IT TO MILES"""
Distance_kilometer=250
per_Kilometer=0.621371
DISTANCE_MILES=Distance_kilometer*per_Kilometer
print("a distance in kilometer to miles for 250 kilometer is",DISTANCE_MILES)
SIR I RUN THIS PROGRAM IT IS CORRECT OR WRONG SIR
distance_km=564.5
# 1.00 km= 0.621371 mi
distance_mi=distance_km * 0.621371
print("Distance in Miles: ",distance_mi)
oh
3:11
from thailand i want subtitle thai pls
OKJust I am the first commenter I can't understand how to add loops
for i in range(5):
print(i)
i = 0
while i
Hi Almaan, we are posting our while loop video next week. Please stay tuned. For the time being, you can go to our website to learn more about Python for and while loops.
10:07 it was easy ;)
distance_km = float(input("km:"))
# 1 km = 0.621371 miles
distance_miles = distance_km * 0.621371
print(distance_km ,"km =",distance_miles,"miles")
just copy paste the code
pls make sure you increase your audio volume
answer of the question is 350.83903045369794
343.9764311118979
distance_in_km=int(input("enter the distance in km:"))
miles=distance_in_km/0.621371
print(miles,"miles")