Thanks for the lessons!! number = float(input('Your number',)) if number > 0: print('the number positive') elif number < 0: print('the number is negative') else: print('the number is exactly 0')
i know im randomly asking but does anyone know of a way to log back into an Instagram account? I somehow lost the password. I would love any tricks you can give me.
@Keagan Dylan thanks for your reply. I got to the site on google and im trying it out atm. Takes quite some time so I will reply here later when my account password hopefully is recovered.
Amazing explanation, easier can't be! I started Python to learn by my self almost 1 week ago (never before that did it). Such courses and short video are really good! Regards from Bulgaria!
num = float(input('enter the number :')) if num == 0: print('the number is 0') elif num < 0: print('the number is negative') else: print('the number is positive') every one has the different approach happy coding !!!!!!
Hi there, you are a very good teacher! I am just starting to learn coding and love your chanel, very easy to follow, and the examples helps us understand! Very good☆☆☆☆☆
number = float(input("Enter Your Number: ")) if number > 0: print("The number is postive") if number < 0: print("The number is negative") if number == 0: print("The number is 0")
This is the code i got omg it works values = int(input('Enter your number: ')) if values > 0: print('The number is positive') elif values < 0: print('The number is negative') else: print('The number is 0')
print ("Number analyzer") num = int(input("Enter your number ")) if num > 0: print ("The number is positive") if num == 0: print ("okay its a zero number") if num < 0: print ("its negetive")
number= int(input("Enter the Number: ")) if number > 0: print ("The Number is Positive") elif number< 0: print ("The Number is Negative") else: print("The Number is 0")
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
sign = float(input("enter the number you want to check:")) if sign == 0: print("your number is 0") elif sign >= 0: print("your number is positive") else: print("your number is negative")
when will you upload the c programming language tutorial and which is perfect book to learn c programming language for beginners and i appreciate the hard work of your team #programiz
# taking user input num = float(input("Enter a number: ")) # checking if the number is positive or negative if num > 0: print("The number is positive.") elif num == 0: print("The number is zero.") else: print("The number is negative.")
number = int(input("enter your number : ")) if number > 0: print("Number is Positive") elif number < 0: print("Number is Negative") else: print("Number is 0") Project 3
num=float(input("enter a number:")) if num0): print("the given number is positive ") else: print ("the given number is 0") OUTPUT -7 The given number is negative 3 The given number is positive 0 The given number is 0
number = float(input()) if number > 0: print("The number is positive") if number < 0: print("The number is negative") if number == 0: print("The number is 0")
number = int(float(input("Give number less the 100.0 = "))) if number < 0: print("Negative") elif number > 0: print("Positive") else: print("Number is 0")
the answer to the programming task is this question = int(input("Enter a number: ")) if question > 0: print ("The number is positive ") elif question == 0: print ("the number is 0") else: print ("The number is negative")
#using if and elif to print if the entered number is 0 or negative or positive number= float(input("Enter a Number: ")) if number>0: print("The entered number is positive") elif number
skipcount = -1 song = ['always', 'look', 'on', 'the','bright','side','of', 'life'] for sing in song: if sing == 'look' and skipcount 0: skipcount = skipcount - 1 continue elif skipcount == 0: print ('a' + sing) skipcount = skipcount - 1 else: print (sing) output: always look aside of life #My Ques: How does it count to 3 or 0 in order to print look and aside? from which direction?
Sir I have a doubt Can we give if statement like this? if(1,2): print("hai") If so, usually in condition we have to give relational expression or Boolean values? So, (1,2) means???
I was toying around with a bit and wondered what would happen if I entered a float, something that some student might try. And it gave: Enter your score: 30.2 Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 10: '30.2' But when I googled it, many answers said this is something Python could take care of automatically. Now I'm confused.
Maybe your code was something like: score = int(input("Enter your score: ")) Correct me if I am wrong. When you run the program and enter 30.2, the program tries to convert '30.2' string to integer, however, it's not possible. To fix this issue, consider changing your code to something like this: score = float(input("Enter your score: ")) The float() function can convert '30.2' to a floating-point number. We have discussed about it in detail in this video ruclips.net/video/DRBybZ6hsY0/видео.html
Yes that's correct, it was score = int(input("Enter your score: ")) And score = float(input("Enter your score: ")) Solves the issue. But is there truly no way to let python convert float into an integer?
@@Trazynn You cannot convert '30.2' string into an integer directly. However, you can convert 30.2 number to an integer using the int() function. Something like this: score = float(input("Enter your score: ")) score = int(score) print(score) # Output: 30 One thing to notice here is that you will lose the part after the decimal point.
Exercise Answer: numbers = float(input("Please Enter a Number: ")) if numbers < 0: print(' The number is negative') elif numbers > 0: print(' The number is positive') else: print('This is number "0" ')
number = float(input("Enter the number: ")) if number == 0: print("The Number is 0") elif number > 0: print("The number is a POSITIVE") else: print("The number is a NEGATIVE")
hi sir , i have a query i put this type of code score = int (input("enter the score =")) if score > 100 and score < 0: print("Score is invalid.") but i don't get the output enter the score = -1 -1 >
programming task . . . # Taking Input As Floating Point Number num = float(input("Enter A Number Of Your Choice: ")) # Logical Tasks # If More Than Zero if num > 0: print("The Number Is positive") # If Less Than Zero elif num < 0: print("The Number Is Negative")
# If The Number Is Zero Itself else: print("The Number Is Zero")
Btw False, 0, empty string that is "" and I think None (not sure) is all considered False in if and elif statements, everything else is considered True. Even if you write: if "False": print("whatever") the print command will be executed because any string is always True, even if it says "False"
#This is a Program to find out if a number is Positive, Negative or 0 number = int(input('Enter the number ')) if number >=1: print (number,'is a Positive Number') elif number == 0: print ("The Number is 0") else: print (number,"Negative")
number = int(input("Enter your number:")) number > 0 print("The number is positive") number < 0 print ("The number is negative") number == 0 print("The number is 0")
Can I use If and elif without closing with else like exapmple below? please advise. Thanks. number = float(input("enter your number: ")) if number < 0: print("The number is negative") elif number > 0: print("The number is positive") elif number == 0: print("The number is 0")
what is error in my programming?? y=str(input("What is your name ?")) print("Nice to meet you", y) c=str(input("How are you ?")) if (c=="fine" or c=="very fine" or c=="good" or c=="very good" or c=="absolutely fine" or c=="absolutely good" or c=="well" or c=="better" or c=="nice" or c=="very nice"): print("nice to listen you", c) else: print("hope you will be fine later") x=int(input("What is your age")) if(x>=18): print("So You are an adult citizen") a=str(input("Do you have job??...answer in yes or no.")) if(a=="yes"): print("Nice") else: print("you must find a way for source of money if needed") else: print("So you are a child")
Thanks for impacting in millions of souls just like me. My question is if user accidentally input alphabet known as string into a given user input and it crased the code by return an error message 👇👇👇👇 Number = float(input("Enter a number" :) if number > 0: print ("The number you entered is a positive number") elif number == 0: print ("The number you entered Zero") esle: print ("The number you entered is a negative number") What if use enter "A" for instance and an error message waa returned so how can I write a code to tell users that only digit/number can be accepted as input.
uhh, hi i am s=also a beginer but i thought to make my own small project which is a password make i was trying to make but ur online compiler is working sloww, pls try to fix iit
*What's wrong with my code?* a = 1 b = 5 c = 8 d = a + b e = a + c f = b + c if d > c : e > b f > a print('Approved') else: print("Not approved") *Please copy and try in your compiler*
There are a couple of things: 1) The condition of the if statement is (d > c). Other conditions e > b and f > a are not used (although it's not an error in Python). Maybe you wanted to do something like: if d > a and e > b and f > a: 2) The indentation of print('Approved') is not correct. Try this: if d > c and c > b and f > a: print('Approved') else: print("Not approved") P.S. Try to give good variable names. I cannot understand what you are trying to do.
score = int(input("enter your score:")) if score >= 50 print("you have passed the exams") print("congratiolation") I copy the code and try to code it but the result is - File "", line 7 if score >= 50 ^ SyntaxError: invalid syntax > what will I do sir?
balance = 3000 print("Welcome to the bank !") print("press A to make a deposit or B to make a withdrawal") Q = (input("What dou you want to do ? :")) if Q == A : Q2 = input(input("how much do you want to deposit ? :")) if Q2 >0: print("your balance is now :",balance-Q2) th compiler says that A is not defined
score = int(input("Enter your score: ")) if score < 0: print("Number is Negative") elif score > 0: print("Number is positive") else: print("Number is 0")
When you pass 65 to the exam_grade() function, if score < 95 condition becomes true and "Top Score" is printed. As soon as it's true, other conditions are not checked and elif and else blocks are skipped. The same logic holds true for other arguments as well. To solve this problem, do something like: # check if score is less than 60 if score < 60: # print fail # at this point we know for sure that score is greater than or equal to 60 elif score >= 60 and score 95: # print Top score # at this point we know for sure that score is less or equal to than 95 elif score >= 60 and score
@@programizstudios I am a beginner in Python, I still have a long way to go. I will try and investigate slowly and relaxed; the only way to handle Python. Thanks for the hint and your prompt reply.
🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges.
Try Programiz PRO: bit.ly/right-python
Thanks for the lessons!!
number = float(input('Your number',))
if number > 0:
print('the number positive')
elif number < 0:
print('the number is negative')
else:
print('the number is exactly 0')
Video has been so much more helpful than my professors MIS class. Thank you so much for the clear explanation!!
I just discovered this course and it is excellent! Everything is well explained for people like me, a complete beginner from Liberal Arts!
ew
i know im randomly asking but does anyone know of a way to log back into an Instagram account?
I somehow lost the password. I would love any tricks you can give me.
@Seth Briar instablaster :)
@Keagan Dylan thanks for your reply. I got to the site on google and im trying it out atm.
Takes quite some time so I will reply here later when my account password hopefully is recovered.
@Keagan Dylan it worked and I now got access to my account again. Im so happy!
Thanks so much, you really help me out!
number = float(input("Enter a number: "))
if number >0:
print("The number is positive")
elif number
Amazing explanation, easier can't be! I started Python to learn by my self almost 1 week ago (never before that did it). Such courses and short video are really good! Regards from Bulgaria!
Thank u sir....one of the best tutorials I found in youtube.......ur teaching style really simple ..easy.... 🙏🙏🙏🙏🙏. Jai Puneeth bro
num = float(input('enter the number :'))
if num == 0:
print('the number is 0')
elif num < 0:
print('the number is negative')
else:
print('the number is positive')
every one has the different approach
happy coding !!!!!!
Hi there, you are a very good teacher! I am just starting to learn coding and love your chanel, very easy to follow, and the examples helps us understand! Very good☆☆☆☆☆
Number = int(input("Enter a number: "))
if Number >= 1:
print("the number is positive")
if Number
number = int(input("What is your number"))
if number >= 1:
print("Number is positive")
if number == 0:
print("Number is zero")
elif number
assign a float value
number = float(input("Enter Your Number: "))
if number > 0:
print("The number is postive")
if number < 0:
print("The number is negative")
if number == 0:
print("The number is 0")
In second and third condition statement use elif instead of if
This is the code i got omg it works
values = int(input('Enter your number: '))
if values > 0:
print('The number is positive')
elif values < 0:
print('The number is negative')
else:
print('The number is 0')
I gusse there is no other creator who can make this level of content that to for free BTW thanks for the online complier it helped me a lot
for i in range(5):
number=float(input("Enter the number:"))
if number>0:
print("The number is positive")
elif number
this vid was more helpful than my whole ict class for the year , thx for this vid
numder = int(input("Enter numder:"))
if numder > 0:
print("it a positive numder")
elif numder < 0:
print("it a negitave numder")
else:
print("it is zero")
Thank you for helping me to get best marks for exams in python
number=int(input("enter a number" or "variable"))
if number>=1:
print("This number is positive")
elif number
I just seen your Website for Data Structures.... It was awesome 🙂 !! Thanks
hi british
print ("Number analyzer")
num = int(input("Enter your number "))
if num > 0:
print ("The number is positive")
if num == 0:
print ("okay its a zero number")
if num < 0:
print ("its negetive")
for the programming task'
number= int(input("Enter the Number: "))
if number > 0:
print ("The Number is Positive")
elif number< 0:
print ("The Number is Negative")
else:
print("The Number is 0")
Thanks sir . I learn from app . I doesn't understand than watch your videos. Thank you so much
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
number=float(input("enter a value:"))
if number>0:
print(" number is positive")
elif number
number=int(input("enter the number:"))
if number0:
print("positive number")
else:
print("it is zero")
sign = float(input("enter the number you want to check:"))
if sign == 0:
print("your number is 0")
elif sign >= 0:
print("your number is positive")
else:
print("your number is negative")
when will you upload the c programming language tutorial
and which is perfect book to learn c programming language for beginners
and i appreciate the hard work of your team #programiz
number = float(input("enter number: "))
if(number > 0 ):
print("Positive")
elif(number < 0):
print("Negetive")
else:
print("it's zero")
# taking user input
num = float(input("Enter a number: "))
# checking if the number is positive or negative
if num > 0:
print("The number is positive.")
elif num == 0:
print("The number is zero.")
else:
print("The number is negative.")
num= float(input())
if num>0:
print("The num is positive ")
elif num
number = int(input("enter your number : "))
if number > 0:
print("Number is Positive")
elif number < 0:
print("Number is Negative")
else:
print("Number is 0")
Project 3
num = float(input("Enter your score:"))
if num >0:
print("positive")
elif num
num=float(input("enter a number:"))
if num0):
print("the given number is positive ")
else:
print ("the given number is 0")
OUTPUT
-7
The given number is negative
3
The given number is positive
0
The given number is 0
num = 0
if num>0:
print("the number is positive")
elif num
number = float(input())
if number > 0:
print("The number is positive")
if number < 0:
print("The number is negative")
if number == 0:
print("The number is 0")
number = int(float(input("Give number less the 100.0 = ")))
if number < 0:
print("Negative")
elif number > 0:
print("Positive")
else:
print("Number is 0")
Number = float(input("Enter a number: "))
if Number
straight to the point and intuitive, very good.
TY
Punit 🙏 well explained bro.... Thanq programiz
the answer to the programming task is this
question = int(input("Enter a number: "))
if question > 0:
print ("The number is positive ")
elif question == 0:
print ("the number is 0")
else:
print ("The number is negative")
#using if and elif to print if the entered number is 0 or negative or positive
number= float(input("Enter a Number: "))
if number>0:
print("The entered number is positive")
elif number
Great Tutorial for beginners, thanks
skipcount = -1
song = ['always', 'look', 'on', 'the','bright','side','of', 'life']
for sing in song:
if sing == 'look' and skipcount 0: skipcount = skipcount - 1
continue
elif skipcount == 0:
print ('a' + sing)
skipcount = skipcount - 1
else:
print (sing)
output:
always
look
aside
of
life
#My Ques: How does it count to 3 or 0 in order to print look and aside? from which direction?
Sir
I have a doubt
Can we give if statement like this?
if(1,2):
print("hai")
If so, usually in condition we have to give relational expression or Boolean values?
So, (1,2) means???
Hi , I love the content and your style of rotating the head left and right like Tanjavoor Doll..
sir when you will be posting the string manipulation chapter of class 11?? Reply as soon as possible pls
love the way to explain with examples❤❤
I was toying around with a bit and wondered what would happen if I entered a float, something that some student might try. And it gave:
Enter your score: 30.2
Traceback (most recent call last):
File "", line 1, in
ValueError: invalid literal for int() with base 10: '30.2'
But when I googled it, many answers said this is something Python could take care of automatically. Now I'm confused.
Maybe your code was something like:
score = int(input("Enter your score: "))
Correct me if I am wrong.
When you run the program and enter 30.2, the program tries to convert '30.2' string to integer, however, it's not possible.
To fix this issue, consider changing your code to something like this:
score = float(input("Enter your score: "))
The float() function can convert '30.2' to a floating-point number.
We have discussed about it in detail in this video ruclips.net/video/DRBybZ6hsY0/видео.html
Yes that's correct, it was
score = int(input("Enter your score: "))
And
score = float(input("Enter your score: "))
Solves the issue. But is there truly no way to let python convert float into an integer?
@@Trazynn You cannot convert '30.2' string into an integer directly. However, you can convert 30.2 number to an integer using the int() function. Something like this:
score = float(input("Enter your score: "))
score = int(score)
print(score) # Output: 30
One thing to notice here is that you will lose the part after the decimal point.
@@programizstudios fantastic. That's what I was wondering.
@@programizstudios so it means float is always better than int? Because float works on both integer and floating number.
Exercise Answer:
numbers = float(input("Please Enter a Number: "))
if numbers < 0:
print(' The number is negative')
elif numbers > 0:
print(' The number is positive')
else:
print('This is number "0" ')
number = float(input("Enter the number: "))
if number == 0:
print("The Number is 0")
elif number > 0:
print("The number is a POSITIVE")
else:
print("The number is a NEGATIVE")
hi sir , i have a query i put this type of code score = int (input("enter the score ="))
if score > 100 and score < 0:
print("Score is invalid.")
but i don't get the output
enter the score = -1
-1
>
programming task
.
.
.
# Taking Input As Floating Point Number
num = float(input("Enter A Number Of Your Choice: "))
# Logical Tasks
# If More Than Zero
if num > 0:
print("The Number Is positive")
# If Less Than Zero
elif num < 0:
print("The Number Is Negative")
# If The Number Is Zero Itself
else:
print("The Number Is Zero")
pls make sure you increase your audio volume
num = int(input("Enter your number: "))
if num >0:
print("Your number is positive")
elif num == 0:
print("Your number is 0")
if num
Hello, can you use more than one ELIF consecutive statements in a row?
Btw False, 0, empty string that is "" and I think None (not sure) is all considered False in if and elif statements, everything else is considered True. Even if you write:
if "False":
print("whatever")
the print command will be executed because any string is always True, even if it says "False"
Good material. Easy to follow
#This is a Program to find out if a number is Positive, Negative or 0
number = int(input('Enter the number '))
if number >=1:
print (number,'is a Positive Number')
elif number == 0:
print ("The Number is 0")
else:
print (number,"Negative")
in "if" you can not use double quotation(" ") ,you use single quotation(' ')
pov: not failing class thanks to this king
number = int(input("Enter your number:"))
number > 0
print("The number is positive")
number < 0
print ("The number is negative")
number == 0
print("The number is 0")
what we should do if we have 3 conditions like the score should be = 50 ?
is endif and endwhile used in python or is that in pseudocode???????????????????????????????????????
i am using window 7 python 32 bit. this program not getting two print input,just replying syntex error
Can I use If and elif without closing with else like exapmple below? please advise. Thanks.
number = float(input("enter your number: "))
if number < 0:
print("The number is negative")
elif number > 0:
print("The number is positive")
elif number == 0:
print("The number is 0")
Yes you can.
hello sir thank you for assisting us in this course how can i get your link in order to be linked with you on github
what is error in my programming??
y=str(input("What is your name ?"))
print("Nice to meet you", y)
c=str(input("How are you ?"))
if (c=="fine" or c=="very fine" or c=="good" or c=="very good" or c=="absolutely fine" or c=="absolutely good" or c=="well" or c=="better" or c=="nice" or c=="very nice"):
print("nice to listen you", c)
else:
print("hope you will be fine later")
x=int(input("What is your age"))
if(x>=18):
print("So You are an adult citizen")
a=str(input("Do you have job??...answer in yes or no."))
if(a=="yes"):
print("Nice")
else:
print("you must find a way for source of money if needed")
else:
print("So you are a child")
Very easy exercise!
Thanks for impacting in millions of souls just like me.
My question is if user accidentally input alphabet known as string into a given user input and it crased the code by return an error message 👇👇👇👇
Number = float(input("Enter a number" :)
if number > 0:
print ("The number you entered is a positive number")
elif number == 0:
print ("The number you entered Zero")
esle:
print ("The number you entered is a negative number")
What if use enter "A" for instance and an error message waa returned so how can I write a code to tell users that only digit/number can be accepted as input.
using the isdigit function
Sir which app u r using to solve progarm
nice . hey i need a favour from you to do. can you explain the types of control statements.
Best video👍👍
Please upload vedio regularly
elf part of the video, in the exam, if score is changed to less than 100, it returns with an error while running
score = 105
if (score > 100 or score < o):
print ("score is invalid")
elif score >= 50:
print("you have passed exam")
else:
print("Sorry you have failed :")
but in the 3-rd line you used parentheses and i am not sure if this is correct
Solid video. Thank you
Thank you very much
For this app ..
tried it out myself really cool
Bro is there any PDF format for all python program it helps to study
uhh, hi i am s=also a beginer but i thought to make my own small project which is a password make i was trying to make but ur online compiler is working sloww, pls try to fix iit
What if you wanted to include decimals?
If score program not running saying expect an indented block
Please add some advanced programming videos containing image processing through python
Please sir or share with me some link related to this!
*What's wrong with my code?*
a = 1
b = 5
c = 8
d = a + b
e = a + c
f = b + c
if d > c :
e > b
f > a
print('Approved')
else:
print("Not approved")
*Please copy and try in your compiler*
There are a couple of things:
1) The condition of the if statement is (d > c). Other conditions e > b and f > a are not used (although it's not an error in Python).
Maybe you wanted to do something like:
if d > a and e > b and f > a:
2) The indentation of print('Approved') is not correct. Try this:
if d > c and c > b and f > a:
print('Approved')
else:
print("Not approved")
P.S. Try to give good variable names. I cannot understand what you are trying to do.
Thank you very much!
You made it work!
score = int(input("enter your score:"))
if score >= 50
print("you have passed the exams")
print("congratiolation")
I copy the code and try to code it but the result is
- File "", line 7
if score >= 50
^
SyntaxError: invalid syntax
>
what will I do sir?
You missed the colon after if score >= 50
@@programizstudios thanks sir your great teacher. I like your video,
balance = 3000
print("Welcome to the bank !")
print("press A to make a deposit or B to make a withdrawal")
Q = (input("What dou you want to do ? :"))
if Q == A :
Q2 = input(input("how much do you want to deposit ? :"))
if Q2 >0:
print("your balance is now :",balance-Q2)
th compiler says that A is not defined
great explanation
number = float(input("Enter a number: "))
Awesome content
score = int(input("Enter your score: "))
if score < 0:
print("Number is Negative")
elif score > 0:
print("Number is positive")
else:
print("Number is 0")
After watching all of your python videos, will I be a python expert??????
sir plz create video on django
#how we can ignore zero values. for example if ans is 1day...i have to print(1 day). but i got ans is("1 days 0 hours 0 min 0 sec) please explain this.
time =int(input())
day = time // (24 * 3600)
time = time % (24 * 3600)
hour = time // 3600
time %= 3600
minutes = time // 60
time %= 60
seconds = time
if day > 0:
print((str(int(day)) + " Days")+(" ") + (str(int(hour)) + " Hours") +(" ") + (str(int(minutes)) + " Minutes") + (" ")+ (str(int(seconds)) + " Seconds"))
elif hour > 0:
print((str(int(hour)) + " Hours") +(" ") + (str(int(minutes)) + " Minutes") + (" ")+ (str(int(seconds)) + " Seconds"))
elif minutes > 0:
print((str(int(minutes)) + " Minutes") + (" ")+ (str(int(seconds)) + " Seconds"))
else:
print(str(int(seconds)) + " Seconds")
simply explained..
What is % and what is the role of it
this use for remainder after division(modulo division),lick- (12%3)=0, (15%4)=3
@@10xcoding53 thanks
I am trying with this problem, and I am getting mad what it is the wrong here
def exam_grade(score):
if score
When you pass 65 to the exam_grade() function, if score < 95 condition becomes true and "Top Score" is printed. As soon as it's true, other conditions are not checked and elif and else blocks are skipped.
The same logic holds true for other arguments as well.
To solve this problem, do something like:
# check if score is less than 60
if score < 60:
# print fail
# at this point we know for sure that score is greater than or equal to 60
elif score >= 60 and score 95:
# print Top score
# at this point we know for sure that score is less or equal to than 95
elif score >= 60 and score
@@programizstudios I am a beginner in Python, I still have a long way to go. I will try and investigate slowly and relaxed; the only way to handle Python.
Thanks for the hint and your prompt reply.
This is awesome
Thank you sir
Thank you 👍
Sir, you are the best
You should create a course on udemy