0:00
1:00:06
1:00:06

Python for Beginners - Learn Coding with Python in 1 Hour

Tech

Learn Python basics in just 1 hour! Perfect for beginners interested in AI and coding. ⚡ Plus, get 6 months of PyCharm FREE with the coupon in the description! 🚀 Want to dive deeper? Check out my Complete Python Mastery course: - Full course: https://mosh.link/python-course - Subscribe for more Python tutorials like this: https://goo.gl/6PYaGF 📕 Get the FREE goodies: - Python cheat sheet: https://mosh.link/python-cheatsheet - Get 6 months of PyCharm for free with this coupon code: MOSH_YOUTUBE - Redeem it at: https://jb.gg/redeem ✋ Stay connected: - Twitter: https://twitter.com/moshhamedani - Facebook: https://www.facebook.com/programmingwithmosh/ - Instagram: https://www.instagram.com/codewithmosh.official/ - LinkedIn: https://www.linkedin.com/school/codewithmosh/ ⭐ Related tutorials https://youtu.be/yVl_G-F7m8c?si=11emtFyDccTKCGn7 📖 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 #Python #AI #MachineLearning #WebDevelopment

ADVERTISEMENT

Comments 100

Sign in to join the conversation

Sign in
J
joanne.rose 1 week, 4 days ago

Never coded a thing in my life before today. print("Weight converter") weight = float(input("Enter your weight: ")) unit = input("Kilograms(kg) or Pounds(lb): ") if unit.lower().startswith("k"): weight /= 0.45359237 print(f"Your weight is {round(weight, 2)} lbs") elif unit.lower().startswith("l"): weight *= 0.45359237 print(f"Your weight is {round(weight, 2)} kg") else: print("Please enter a valid unit (kg or lb).")

G
garry.hayes 1 week, 5 days ago

Anyone watching June 4th. Let's start a great journey

J
jilllewis330 1 week, 5 days ago

I am a complete beginner to this world, I have challenged myself to understand and achieve all of this and more by this time next year (I am not tech savvy :") ) I will not forget to come back here and update with my progress, this is the first step i am taking, this video! I am aiming to be an AI engineer with absolutely no prior experience. Good luck to all looking to change their life ❤️

francisca_gonzález
francisca_gonzález 1 week, 5 days ago

Tried to be a bit creative here. # player_code = input("What is your player code? ") # code = 1000 - int(player_code) # print("Greetings! Your code for the room is", code, "Please wait while we connect you to online server") --------------- This is my approach for 15:04 First = input("First: ") Second = input("Second: ") Third = input("Third: ") Sum = int(First) + int(Second) + float(Third) print("Sum = ", Sum)

S
sébastienraven35 1 week, 6 days ago

Anyone watching 2nd june 2026? 🙋 Reply let's connect and make a team.

C
christina.lewis 2 weeks ago

June 1st 2026 Let mark our attendance

revadawn74
revadawn74 2 weeks, 1 day ago

Anyone on 1 June 2026

babyberry
babyberry 2 weeks, 4 days ago

Watching on the 29th of May, to take a course in AI and Machine Learning, to get a better job and grooooowww

H
hans-hinrichhendriks264 3 weeks ago

Starting today May 26, will give updates every now and then!! (reminders are appreciated)

jorge_razo
jorge_razo 3 weeks, 6 days ago

This is how I wrote it (simple) title = "Patient 165" name = "John Smith" age = "20 Years" registration_date = "May 2026" patient_registration_status = "new patient" print (f"{title}'s Name is {name}, he is {age} old and was registered in {registration_date}, therefore he is a {patient_registration_status}")

P
pietrawhisper21 3 weeks, 6 days ago

Anyone starting today, May 20, 2026

angela.patterson
angela.patterson 1 month ago

Huge Huge thanks Mosh, this has shed light on something I’ve been struggling to grasp!

A
allenanderson404 1 month ago

Any one watching this in 2026 for getting a great job 😂❤

L
laurencebailly256 1 month, 4 weeks ago

I'm finding challenges learning data science, I hope this video will be instrumental in shaping my career journey

D
daniel_wali 2 months ago

I'm 15 years of age as of now and I'm beginning to teach myself code. This has really helped me understand the basics for coding. Thanks Mosh.

K
karen_larson 2 months, 1 week ago

a=int(input("weight:")) option=str(input('kg or pound=')) if option.upper()=='kg': print(a*2.2) elif option.upper()=='pound': print(a/2.2) else: print('error') print("done")

monica.proctor
monica.proctor 2 months, 4 weeks ago

weight converter program weight=int(input('weight:')) convert=input('(k)g or(L)bs :') if convert=='k': final= weight*2.2 print('weight in lbs:',final) elif convert=='L': final = weight/2.2 print('weight in kg:',final)

annshah455
annshah455 2 months, 4 weeks ago

I'm here because I'm nine and I wanna start learning Python to become an astronomer one day

R
rael.novaes 3 months ago

I literally just started learning python this is so handy here is my code for the first example age = 20 first_name = "John" last_name = "Smith" new_patient = True print(age , first_name , last_name , new_patient)

R
robinhollow77 3 months, 1 week ago

weight = int(input("Weight: ")) unit = (input("(K)g , (L)bs ")) if unit.upper() == "K": converted_weight = weight * 2.2 print('weight in Lbs', (converted_weight)) elif unit.upper() == "L": converted_weight = weight * 0.45 print('weight in Kg', (converted_weight))