Python for Beginners – Learn Python in 1 Hour
This Python tutorial for beginners show how to get started with Python quickly. Learn to code in 1 hour! Watch this tutorial get started!
👍 Subscribe for more Python tutorials like this: https://goo.gl/6PYaGF
🔥 Want to learn more? Watch my complete Python course: https://youtu.be/_uQrJ0TkZlc
📕 Get my FREE Python cheat sheet: http://bit.ly/2Gp80s6
Courses: https://codewithmosh.com
Twitter: https://twitter.com/moshhamedani
Facebook: https://www.facebook.com/programmingwithmosh/
Blog: http://programmingwithmosh.com
#Python, #MachineLearning, #WebDevelopment
📔 Python Exercises for Beginners: https://goo.gl/1XnQB1
⭐ My Favorite Python Books
– Python Crash Course: https://amzn.to/2GqMdjG
– Automate the Boring Stuff with Python: https://amzn.to/2N71d6S
– A Smarter Way to Learn Python: https://amzn.to/2UZa6lE
– Machine Learning for Absolute Beginners: https://amzn.to/2Gs0koL
– Hands-on Machine Learning with scikit-learn and TensorFlow: https://amzn.to/2IdUuJy
TABLE OF CONTENT
0:00:00 Introduction
0:00:30 What You Can Do With Python
0:01:15 Your First Python Program
0:05:30 Variables
0:09:08 Receiving Input
0:10:48 Type Conversion
0:18:49 Strings
0:23:41 Arithmetic Operators
0:25:59 Operator Precedence
0:27:11 Comparison Operators
0:28:52 Logical Operators
0:31:06 If Statements
0:36:16 Exercise
0:41:42 While Loops
0:45:11 Lists
0:48:47 List Methods
0:52:16 For Loops
0:54:54 The range() Function
0:57:43 Tuples
source
Leave us a comment Cancel reply
COMMON QUESTIONS
Categories
- Agile Coach
- ARTIFICIAL INTELLIGENCE
- Block chain
- Business Analyst BA
- DATA science
- Development
- Devops Automation
- Dotnet
- Education
- Free Job training and assistance
- Information
- Infrastructure automation
- Interview questions
- JAVA
- jobs
- Learn
- Machine learning
- Python Automation
- QA Automation
- RPA Automation
- SAP crm
- Scrum master Agile
- Skill
- UI Design
- Uncategorized
32 Comments
Programming with Mosh
May 11, 2022 14:15 pmA good friend of mine has started a study channel to help people who need focus and motivation. I've seen her videos and they look great! These videos are great for anyone coding or learning to code. Check them out: https://youtu.be/DtTPetY7Rrw
Christyna Sangeetha
May 11, 2022 14:15 pmData science
Neil Roy
May 11, 2022 14:15 pmchallenge(38:39)
print('lbs to kg or kg to lbs converter')
weight = input("your weight: ")
unit = input("its in for kg type k or for lbs type l: ")
if unit == "k":
print("your weight in lbs is")
print(float(weight) * 2.20462 )
elif unit == "l":
print('your weight in kgs is' )
print(float(weight) / 2.20462 )
Neil Roy
May 11, 2022 14:15 pmexercise (9:06)
first_name = ("John")
second_name = ("Smith")
age = ("20")
status = ("new")
print(second_name)
print(first_name)
print(age)
print(status)
Yom
May 11, 2022 14:15 pmTip for anyone who's not used to this type of videos: If you're havng trouble getting through the course, put on some background music so you can get yourself motivated to learn!
SAJID MAHMOOD
May 11, 2022 14:15 pmYou said by 13 divided by 2 at 27th minute
Ted Sassi
May 11, 2022 14:15 pmWould anyone be able to answer my question?
For the Exercise 36 minutes in, I wrote:
Weight = int(input("Weight: "))
Unit = input("(K)g or (L)s: ")
if Unit == "K" or "k":
print(Weight * 2.20462)
if Unit == "l" or "L":
print(Weight * 0.453592)
However, whenever I enter either K, k, l, or L into the terminal window, I get an answer for both my if functions. So the terminal window ends up looking like:
Weight: 170
(K)g or (L)s: k
374.7854
77.11064
I thought if the answer to the input didn't correspond to an option in the if function, then the subsequent piece below (with the indentation) would not run?
Would anyone be able to tell me why this answer didn't work?
Shymekk
May 11, 2022 14:15 pmits really enjoyable and easy to understand even though i do not understand everything that you are saying beacouse i was not born in a english languaged country.
This video inspired me to start programming thank you Mosh.
maureen o’brien
May 11, 2022 14:15 pmData science. Thank you for this!
Xuan Power
May 11, 2022 14:15 pmI want to learn to transition into a cyber sec/Cloud. Tired of driving a semi truck.
If you have a LinkedIn, post it below, let’s connect! See everyone at the top 💪🙏
DHAVAL CHAVDA
May 11, 2022 14:15 pmpatient_name = "john smith"
years_old = 20
patient = "new"
print(patient_name)
print(years_old)
print(patient)
Ali Vendeta
May 11, 2022 14:15 pmآموزش فارسی دارید؟ این شکل یکم سخت میشه🥲
dusty
May 11, 2022 14:15 pm36:16
it took a while but i got there eventually
Weight = input("Weight: ")
form = input("(K)g or (L)bs: ")
if ("K")== form or ("k")== form:
Weight_in_pound = float(Weight) * float(2.20462)
print("Weight in pound: " +str(Weight_in_pound))
elif ("L")== form or ("l")== form:
weight_in_kg = float(Weight) * float(0.453592)
print("weight in kg: "+str(weight_in_kg))
DDP LOP
May 11, 2022 14:15 pmExercise 1:
Age = 20
Name = 'Smith'
Situation = "a new patient."
print(Name, "is", Situation, 'He is', Age, "years old.")
Tuấn Nguyễn
May 11, 2022 14:15 pm0:36:16 Exercise
weight = input("Weight: ")
kg_or_p = input("(K)g or (L)bs: ")
if kg_or_p == "l" or kg_or_p == "L": # kg_or_p.upper() == "L":
result = float(weight) * 0.45
print("Weight in Kg: " + str(result))
elif kg_or_p == "k" or kg_or_p == "K": # k g_or_p.upper() == "K":
result = float(weight) / 0.45
print("Weight in Kg: " + str(result))
Le Cadre
May 11, 2022 14:15 pmare u from lettland ?
Anything With Rice
May 11, 2022 14:15 pmThank you so much for teaching!! You're such a good teacher!
Westside Courtesy
May 11, 2022 14:15 pmI’m learning because I’m tired of being a burden on society
Naa Omo
May 11, 2022 14:15 pmname = "John_Smith"
age = 20
status = "New Patient"
print(name)
print(age)
print(status)
HARDBRO GAMING
May 11, 2022 14:15 pmI am 13. Is this a good language for me learn if i want to get into coding or should I start with something else?
Amber Krishna
May 11, 2022 14:15 pmhi I am 11 years old and me and my friends are making a robot this would really help I am aahana by the way hope you create such wonderful videos ,
dawud oguntoyinbo
May 11, 2022 14:15 pmThanks for your lessons. You're a very good tutor. I learned so much so quickly.
Matthew Mckeen
May 11, 2022 14:15 pmWeight Converter Exercise:
import math
active = True
while active:
Weight = float(input("How much do you weigh?: "))
conversion = input("nIs that in KG or LBS?: ")
kg = Weight / 2.205
lbs = Weight * 2.205
if conversion in ["KG", "kg", "Kg", "K", "k"]:
print(f"You weigh {round(lbs, 1)}Lbsn")
break
elif conversion in ["LBS", "lbs", "Lbs", "L", "l"]:
print(f"You weigh {round(kg, 1)}Kgn")
break
else:
print("Invalid command, try again!")
continue
else:
print("Not active")
Master Cuber
May 11, 2022 14:15 pm13 years old looking for a part-time job learning Data Science
Kerrigan White
May 11, 2022 14:15 pmI've hated programming and felt that I'm worthless at it, but I need to learn python for work. I'm only 20 minutes in and all of this is making so much sense to me, and it doesn't only make sense but it's fun as well. I couldn't for my life code anything out of my own head before, other than "Hello world!". This is really life changing for me, thank you so much.
Tsegaye Bekele
May 11, 2022 14:15 pmWeb development
Oyadiran Isaiah
May 11, 2022 14:15 pmI'm learning as a data scientist sir
JK Curti
May 11, 2022 14:15 pmUsing Python to program IoT devices and with Microsoft(TM) SQL backend DB. Will also be doing some Web and Android App creation later, so integrated Jango will be greaat for Web side. Great primer! Thanks very much for your gift of training to humanity.
Shoumitro Kumar Biswas
May 11, 2022 14:15 pmI used the following code for Weight conversion excercise:
weight = input ("Weight: ")
Kg_or_Lbs = input("(K)g or (L)bs: ")
if Kg_or_Lbs =="K" or Kg_or_Lbs =="k":
print("Weight in Lbs: "+ str(float(weight)*2.20))
elif Kg_or_Lbs =="L" or Kg_or_Lbs =="l":
print("Weight in KG " + str(float(weight)/2.20))
else:
print("Error in Input")
Mr. Duck
May 11, 2022 14:15 pm26:00
Adding on to this, the concept in math is called "PEMDAS" which dictates the order of operations at which the equation is evaluated. The equation is evaluated in order as…
P: Parenthesis
E: Exponent
M: Multiplication
D: Division
A: Addition
S: Subtraction
Sharon Davis
May 11, 2022 14:15 pmI’m learning for web development and a new career path after retiring as a teacher. Thank you, Mosh🙏🏽
DiverseGameplays
May 11, 2022 14:15 pmi fucking hate python i tried it and no fucking keys on my keyboard works, hate it