Python for Beginners - Learn Python in 1 Hour

Python for Beginners - Learn Python in 1 Hour

Programming with Mosh

3 года назад

16,660,456 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Sunita Tiwari
Sunita Tiwari - 21.09.2023 23:27

11 type

Ответить
mike urata
mike urata - 21.09.2023 16:34

Im planning on learning python to get a step up in my career. It’s not a requirement for my role but it’s been in my vicinity since day 1. My daily commute is roughly 2 hours/day on local transit, why not learn something instead of death scrolling or sleeping?

Ответить
Misker Engida
Misker Engida - 21.09.2023 14:04

I want it to master on web development.

Ответить
who cares
who cares - 21.09.2023 12:40

I'm here because synchronicity took me here

Ответить
biology green
biology green - 21.09.2023 10:48

شما ایرانی هستین؟!

Ответить
enjoyer
enjoyer - 20.09.2023 20:31

learning bc i can’t understand my teacher in school…

Ответить
Gia An
Gia An - 20.09.2023 18:14

10. Bạn sẽ tìm thấy niềm vui khi giúp đỡ người khác bằng tất cả tấm lòng. Cuộc sống, ngay cả khi có một ngàn lý do để làm cho bạn khóc, bạn vẫn phải tìm một triệu lý do để giữ nụ cười.3. Đừng bao giờ thay đổi mình vì người khác. Nếu họ không thể tiếp nhận một con người nhiều điểm xấu là bạn, thì cũng không xứng để có được một con người với nhiều điểm @Programming with Mosh

Ответить
karim Alameh
karim Alameh - 20.09.2023 16:57

Thank you mosh i came to this!!!! TWICE!!!!

Ответить
RIFFAT HUSSAIN
RIFFAT HUSSAIN - 20.09.2023 16:12

Name="John Smith"
Age=20
Status="New Patient"

Ответить
Abhiram Anand
Abhiram Anand - 20.09.2023 14:00

Thank you Mosh sir, now I can pass my Computer Practical

Ответить
AKSHAY
AKSHAY - 20.09.2023 13:16

For hacking

Ответить
Küçük Murat Reis IV
Küçük Murat Reis IV - 20.09.2023 11:50

age = 20
name = (''John Smith'')

Ответить
Faith Mulatya
Faith Mulatya - 20.09.2023 10:01

Thanks mosh, representing kenya

Ответить
Cute foxy
Cute foxy - 20.09.2023 09:30

thank you so much it helped me alot ,i thought python was hard but i got a better understanding now :)))))))))))

Ответить
Avinash
Avinash - 20.09.2023 05:26

patient_name = ('John Smith')
Age = 20
New_patient = True

print(patient_name,Age,New_patient)

Ответить
bebranimator374
bebranimator374 - 20.09.2023 01:37

good, man!

Ответить
NASA Enginner
NASA Enginner - 19.09.2023 21:08

Mosh are you iranian because hamedani is a surname in iran... by the way if you are nice job buddy you learned me evrything.thanks

Ответить
BlazingDragon
BlazingDragon - 19.09.2023 20:57

This was my code:
first_name = "Jhon"

last_name = "Smith"
age = 20

newpatient = True

oldpatient = False

Hope this helps some people!

Ответить
Prakash gantedi
Prakash gantedi - 19.09.2023 16:20

use hair oil for next tutorial

Ответить
Eekno
Eekno - 19.09.2023 14:23

Game development.

Ответить
Rajko K
Rajko K - 19.09.2023 09:44

Web development

Ответить
Zizo
Zizo - 19.09.2023 06:06

Time flew by so quick. Unfortunately I will now start forgetting... I have to start practicing.
Question, how clean is installing Python on a PC? I mean is it easy to uninstall without leaving behind random folders and files that I have to hunt down for peace of mind? Are they easily traceable at least?

Ответить
Alan Escobar
Alan Escobar - 19.09.2023 05:20

Looking froward learning python for fun to use in web development and cybersecurity. :)

Ответить
Dru Gheorghe
Dru Gheorghe - 19.09.2023 04:18

for lbs <> kg conversion

str1="Weight in lbs"
str2="Weight in kg"

weight = int(input("What is your weight?"))

kg_or_lbs = str(input ("Is is in kg or lbs?"))

if kg_or_lbs == ' kg':
weight_lbs = weight * 2.2
print(str1,weight_lbs)

elif kg_or_lbs == ' lbs':
weight_kg = weight / 2.2
print(str2,weight_kg)

Ответить
Axioy
Axioy - 19.09.2023 04:02

character_name = "John Smith"
character_age = "20"
print("Hello Sir " + character_name + "")

Ответить
brian brown
brian brown - 19.09.2023 01:31

Trying to learn python so I can get into data science and machine learning and leave my security guard job. I’m super new to all of this so it’s a bit of an overload of info. But I’m determined. Thanks for the video

Ответить
Mirka Dodo
Mirka Dodo - 18.09.2023 22:34

Hackers behind every account and they are going to acting like Saints 😂😂😂WTF all of you missing only Glory around your dicks 😂😂😂Do you think you need moreeeee courses?!😂😂😂Master Python types 😂😂😂

Ответить
filip lecic
filip lecic - 18.09.2023 22:25

thank you mosh it is my first time learning a programing language even thou i am not the smartest i still learned python i really mean im not the smartes look how i made the calculator
number = input("First: ")

P_nuber = input("second: ")

equal = float(number) + float(P_nuber)

print(equal)

i mean it works but againts yours it doesnt make any sense

Ответить
MotoMatt
MotoMatt - 18.09.2023 22:01

Completely new to coding and have been teaching myself as a side project till I found this video. My code works and also allows the loop to confirm the information entered for both accuracy and formatting.

# Entering standard name line
information_correct = False
while not information_correct:

# Collecting the first name
first_name = input("Enter first name: ")
# Collecting the middle initial
while True:
middle_initial = input("Enter middle initial: ")
if len(middle_initial) == 1 and middle_initial.isalpha():
break # Exit the loop if the input is valid
else:
print("Invalid input. Please enter a single letter for middle initial and press Enter")
# Collecting the last name
last_name = input("Enter last name: ")
print("You entered", last_name, ",", first_name, middle_initial)
confirmation = input("Is this correct? (y/n): ")
if confirmation.lower() == "y":
print("Confirmed")
information_correct = True
elif confirmation.lower() == "n":
print("Please re-enter correct information.")
else:
print("Invalid response. Please enter 'y' for yes or 'n' for no.")

# Calculating for Age
import datetime
birthdate_correct = False
while not birthdate_correct:
# Collect birthdate using the format "YYYY-MM-DD"
birthdate = input("Enter birthdate (YYYY-MM-DD): ")
# Convert birthdate into a datetime object
try:
birthdate = datetime.datetime.strptime(birthdate, "%Y-%m-%d")
# Check to see if birthdate is in the future
current_date = datetime.datetime.now()
if birthdate > current_date:
print("Birthdate cannot be in the future. Please re-enter the correct birthdate.")
else:
birthdate_correct = True
except ValueError:
print("Invalid date format. Please use the format YYYY-MM-DD and re-enter the correct birthdate.")
continue # Continue to loop till a valid date is entered
# Calculate the age
age = current_date.year - birthdate.year - ((current_date.month, current_date.day) < (birthdate.month, birthdate.day))
# Display the age
print("Current age is:", age)
confirmation = input("Is this correct? (y/n): ")
if confirmation.lower() == "y":
print("Confirmed")
birthdate_correct = True
elif confirmation.lower() == "n":
print("Please re-enter correct information.")
else:
print("Invalid response. Please enter 'y' for yes or 'n' for no.")
exit()

If you would rather just enter the age you can use this code instead of calculating for age using the birthdate.

# Entering Age
information_correct = False
while not information_correct:
age = input("Enter age: ")
print("You entered", age)
confirmation = input("Is this correct? (y/n): ")
if confirmation.lower() == "y":
print("Confirmed")
information_correct = True
elif confirmation.lower() == "n":
print("Please re-enter correct information.")
else:
print("Invalid response. Please enter 'y' for yes or 'n' for no.")

I hope this helps people.

Ответить
Tenebrae
Tenebrae - 18.09.2023 20:23

👏👏

Ответить
RummelReiner 69
RummelReiner 69 - 18.09.2023 16:00

first_name = Josh
last_name = Smith
age = 20
new_patient = True

Ответить
Rabin Shrestha
Rabin Shrestha - 18.09.2023 10:24

my code is
first_name="jhon_smith"
age=20
new_patient=True
print(first_name)
print(age)
print("is new paitent")

Ответить
Rivibibu Prabashwara
Rivibibu Prabashwara - 18.09.2023 02:17

Hello, I'm student from Sri Lanka. I'm learning python for improve my skills. but my dream is become a physics scientist. However thank you for your video.

Ответить
kockny23
kockny23 - 18.09.2023 00:13

weight = int(input("how much is your weight? "))
unit = input("lbs or kgs? ")
if unit == "kgs":
print("then you have "+str(int(weight) *2)+" lbs")
elif unit == "lbs":
print("then you have "+str(int(weight)/2)+ " kgs")

Ответить
rincy antony
rincy antony - 17.09.2023 20:20

Learning to make games

Ответить
Dave L
Dave L - 17.09.2023 19:36

print(“new_patient”)
print(“age 20”)
name = “John_Smith”
print(“name “ + name)

Ответить
Assasin Gamer
Assasin Gamer - 17.09.2023 18:16

name = John Smith
age = 20
is new = true

Ответить
Taydennaidoo
Taydennaidoo - 17.09.2023 14:45

lol i was way off for this activity
weight = int(input("What is your weight? "))
input("Kg or Lbs? ")
if weight: == "kg".upper()
input(weight * 0.45)
else weight: == "Lbs".upper()
input(weight / 0.45)

Ответить
shelly davies
shelly davies - 17.09.2023 14:19

Pycharm is not free anymore, I can not complete any of the online videos because they only want subscrition, so I cant use this video. Unless you redo the video using python IDLE, which is what I have downloaded...which I can not find any video tutorials using so far..or if you know of any videos created using the IDLE programme.

Ответить
Hour Lim
Hour Lim - 17.09.2023 11:21

Name_of_patient = John_Smith
Age = 20
Patient = New

Ответить
Shashank Sharma
Shashank Sharma - 17.09.2023 07:00

x = 3 == 2+1
print(x)

x = 3 here also

Ответить
Shashank Sharma
Shashank Sharma - 17.09.2023 06:35

n1 = input('enter your first number')
n2 = input('enter your second number')
sum = int(n1) + int(n2)
print(sum)

Ответить
KUDASINN
KUDASINN - 17.09.2023 05:18

weight=float(input("Weight: "))
unit=input("(K)g or (L)bs: ")
kg=str(weight*0.45)
lbs=str(weight/0.45)
if unit=='k' or unit=='K':
print("Weight in Kg: "+kg)
elif unit=='l' or unit=='L':
print("Weight in Lbs: "+lbs)
else:
print("You've entered a wrong option")

Ответить