I am a college student who had to put school on pause for a bunch of complicated reasons so I am currently working 10hrs a day doing IT and I really love these, when I am at my desk I can watch Mr. McWhorter with a cup of black coffee and I can keep learning and I don't feel like I am throwing away my time Thank you. When I can afford to I will be joining your patreon to pay you for this amazing service you provide.
Its not just your teaching that I love.You want people that you barely know to learn well and excel in their lives. That much is clear from the way you motivate people to do the assigned homework. In India we call such a person a GURU.
Thanks for another great lesson. The window management your doing is great. Just the fact that you care about it says everything to me. Support this great teacher guys, he deserves it! See you next week Paul ☕😉
number=float(input('Please enter your number: ')) if number%2 == 0: print('Your number is even') if number%2 > 0: print('Your number is odd') Paul, a shorter way to do it without the rem variable. Great series as usual
Thank you for your lessons:) You make Python very easy to learn! myNumber=float(input('Please Input your number')) if (myNumber== 7): print('You are lucky') if (myNumber != 7): print('You are unlucky')
Not a mathematician, but can say with a very high level of confidence that 0 is most definitely an even number. That's my only comment about this video, everything else is great! Keep up the good work!
I jumped over here from the Raspberry Pi lessons to get better python programming skill before continuing the Pi lessons. Thanks for all of the great material.
Assignment is completed in under 5 minutes! Thank you very much for another great lesson. Indentation and colon are very unusual for me, I have to get used to it. Thank you so much again 🎉
Great lesson as always! I forgot about the % operator and so I the homework as shown below. Note, that I needed to keep changing the variable type to get a good, clean sentence format in my final prints. ### Homework ### #Get number fro the user and tell user if number is even or odd. Number = float(input('Please enter your integer: ')) x = Number / 2 y = int(x) Numberint = int(Number) Numberstr = str(Numberint) if (x == y): print('Your number,' , Numberstr + ',' , 'is an even number.') if (x != y): print("Your number," , Numberstr + ',' , 'is an odd number.')
I think I guessed ahead to the next lesson, but I used an 'and' condition to check if the inputted number was both greater than 0 and the remainder was equal to zero for an even number, and gave zero it's own print message because everyone is a comedian. I'm seriously loving this series, Paul!
I'll be honest I had to watch this a few times to really understand the lesson. Great Job! I'm trying to pick up all the little details an understand as you build students up.
I was able to solve this problem! Gotta love the % function. Another fantastic lesson! Thank you Paul for always thinking of the Absolute beginner. I really enjoy these lessons.
I've managed to get this up and running on Linux Ubuntu, which is a little more involved than windows to say the least, but so far it seems to be working perfectly. This user interface is amazing and I'm looking forward to putting it thru the paces of coding process. Lots of us don't realize what's involved, when you code a program for your specific PC, and to get the results you expect depends on the software being setup properly. If you've worked with command line programs enough, you know what I'm talking about. There are lots of bad information, that's probably no intentional, being passed around that don't work because of all the different configurations for different PC's.
Great Lesson as always..... One thing too mention is when we were entering in the color in the program remember that Red and red are seen by the computer differently. So Red != red just a heads up... Thanks as always
Hey Paul, I am an Aerospace Engineering graduate student trying to learn python and these videos have been awesome! Also, Christian and black coffee drinker here as well! 😁
2nd day in a row and 6 lessons done. I love it! Thumbs up ⚡, subscribed⚡, arduino in the mail 📫and will patreon to celebrate my 100th lesson 🚀Thank you so much for sharing your knowledge, BOOM 💥☕
Hi Paul, I remembered what you said about the MOD function and worked out this homework on my own. I didn't include the "Please Play Again" but added it later. Thanks again.
I got it figured out. I have to say though I have had a similar HW assignment years ago, but that was for a C programming class. It's good to know that I am able to recall that old stuff plus use the new stuff that I've learned through watching your amazing videos!
I paused and did my homework! I knew I had to use the mod somehow but it took a while for my old brain cells to figure it out! Apart from variable names, my solution was almost identical to yours. By the way, "an" and not "and" in front of vowels.......😜
Thanks for the lesson on IF. I tried to see if a program can be written that will show if a number is divisible by 9 using the same format as you have displayed. It worked! I thumped my chest and now there seem to be two Huckleberrys running around.
This took me longer than i'd like to admit but thought about it at work, came home, still had syntax issues but I FIGURED IT OUT!!!! x=float(input('What number would you like to examine? ')) y=2 z=x%y if (z == 0): print('Your number is EVEN') if (z != 0): print('Your number is ODD')
I'm not an expert at anything but I do have fun at whatever I do. Just having the time of my life with the homework. Reminds me of a program I wrote in 'C' where you guessed the number with the fewest guesses to win. Fun watching people try. Have a great week.
I did it too!! Thank you! number = float(input("Enter a number please: ")) print (f"The number ({number}) is even.") if number % 2 == 0 else print (f"The number ({number}) is odd.")
Great lesson, Paul! I figured out the homework. Took me a minute or so to figure the syntax, since I don't usually use %. However, I probably took longer to test it than it did to write. it. Thanks again!
IM LEGEND!!! I understood this SO well Paul, thank you so much you are the best teacher ever, one day I might be able to help you out at patreon and I would like to do that🙂
I actually got it done but I had to see the first video . Knew it that it was just somewhere there. Thanks for the cool videos. And keep giving homeworks.
Hi Paul. I did the homework% I had repeated all the tutorials using Visual Studio Code so remembered the trick in finding odd or even numbers. Thanks for the challenge.
I know that I'm a bit late to add a comment but I've only just found your Python tutorials. I used int instead of float. In your solution, you don't get a reply if you enter '4.1' but mine blows up because the input is invalid which I think is preferable. Of course, they both blow up if you enter 'banana'😁
Thanks a lot for this tutorials Mr. McWhorter, can you please start a new tutorial series guiding how to make a simple Arduino Quadcopter drone. I am trying to make my own Arduino drone, but while doing the coding, a lot of compile time errors are appearing!!!. There are many electronic hobbyists like me who are struggling to make drones. You are the most excellent tech instructor in You tube who can explain things very clearly. Hope you will accept my request.
Yeaaaahh!! I did a good job with the assignment sir 😎👌🏻. I didn't see yet the correction but it is perfectly working. Edit: the only difference i used one variable X, so i did the operation inside the if statement 😁
Hey Paul, great stuff. Is it possible to remove the directory pathways from the terminal window? It's mighty cluttered down there and makes viewing difficult.
Thank you for the amazingly informative lessons. Could you please specify starting which lesson we will need the Arduino and any cable or kits with it so that I can buy it before. Thank you
number = float(input("Please type your number: ")) if number % 2 == 0: print("Your number is even") elif number % 2 != 0: print("Your number is odd") I did it on my own though I had to check my old notes about the mod function from the previous lessons. (I have an excel board for keeping notes through the tutorials)
Hey Paul, great video! I was wondering if you would include some other configurations in case the user answers 'red', 'Red', and 'RED', which are all in fact 'red', just written slightly differently. Do you cover this in your next videos? Thank you so much, keep up the wonderful work!
I did homework in very different way, it creates two variables from user input float and int then divide them both by 2 and if they are equal it means the number is even and vice versa that took me about 15 mins: myNumber=float(input('Please Input your number: ')) myNumber=myNumber/2 myNumberInt=int(myNumber) if (myNumber==myNumberInt): print('Your number is even') else: print('Your number are odd')
Managed to figure it out! I just divided the the number by 2 and saved one as an int and the other as a float. Then I just converted the int to a float and compared the two.
LOL! I got it done in about 5 minutes. But to be fair, I've done a good bit of coding in the past. I'm learning this for fun and to play with my audrino when it gets here.
Hi Paul, I do not have the same text colors as you have now ( no red if or red operands or blue prints). The colors matched on tutorial 5 , but your colors changed on tutorial 6. How did you change them? I am really enjoying this tutorial. I have done all the older ones also. Keep up the great content. Thank you for the great lessons.
In testing the code, I found that even though myNumber is a ‘float’, entering a non-int crashes the program. I did some internet research and confirmed to myself that the odd/even concept only applies to “Whole” numbers
I did my homework in couple of minutes but i noted a strange thing when testing. Using FLOAT on input caused the code to always return EQUAL on any number bigger than 16 digits, no matter what it was. When i used INT, it worked properly. I'd like to know more about the reasons for this peculiar oddity.
My first tought was to do something multiplying my number by 5 and then divideing it by 2 and lastly checking if the last digit was a 5 or a 0, but then i remebered % and my life became 2x less stressing.
I did the Homework a little different, something like this: myNumber=float(input('Enter your number here: ')) if(myNumber%2==0): print('Your number is even!') if(myNumber%2==1): print('Your number is odd!')
I'm stumped! I have a previous version of Visual Studio installed containing Platformio, and I can't figure it all out to install Python. How can I remove it all and start over in Windows10?
a=float(input('Enter a Real Number: ')) b=a%2 if(b == 0): print('Your Number is Even') if(b == 1): print('Your Number is Odd') if(b != 0 and b != 1): print('Your Number is Neither Even Nor Odd') Finally I remembered the "%" sign while trying
Yes, I am proud, because the homework required you to use not just what I taught today, but what I taught in previous lessons. Success requires you to continue to add to your tool set, and not forget the old tools you got previously. Good job.
About the homework... float doesn't make sense it should be an integer. If you use float and the input from the user is 2.2 the result will be odd. I don't like float in this case at all. My version: # Variables number = int(input('What is the number you want to check? ')) # Program if (number % 2 == 0): # The number is even print('') # Nice formatting - blank line print('Result:') print('Wow! Fantastic! Your number ' + str(number) + ' is an even number!') if (number % 2 != 0): # The number is odd print('') # Nice formatting - blank line print('Result:') print('What a bummer! Your number ' + str(number) + ' is an odd number!') Best wishes from Belgium :-)
Hi Paul, Im making a month guesser in python and I dont know why it don't work heres the code print('Month guesser') firstdayname=input('What is the first day of the months week name: ') if (firstdayname=='Tuesday'or'tuesday'): print('oct') if (firstdayname=='Wednesday'or'wednesday'): print('may')
print('Month guesser') firstdayname=input('What is the week name of the first day of the month: ') if (firstdayname=='monday'or firstdayname=='Monday'): lastdayname=input('What is the week name of the last day of the month:') if (lastdayname=='wednesday'or lastdayname=='Wednesday'): print('You little booger you picked one of he 2 special months now I have to ask a special question') fourthojuly=input('Is the forth day of this month an American Holiday') if (forthojuly=='yes'or forthojuly=='Yes'): print('July') if (forthojuly=='no'or forthojuly=='No'): print('January') if (lastdayname=='tuesday'or lastdayname=='Tuesday'): print('April') if (firstdayname=='tuesday'or firstdayname=='Tuesday'): print('October') if (firstdayname=='wednesday'): print('May') if (firstdayname=='thursday'or firstdayname=='Thursday'): lastdayname=input('What is the week name of the last day of the month:') if (lastdayname=='thursday'or lastdayname=='Thursday'): print('Febuary') if (lastdayname=='saturday'or lastdayname=='Saturday'): print('August') if (firstdayname=='friday'or firstdayname=='Friday'): lastdayname=input('What is the week name of the last day of the month:') if (lastdayname=='sunday'or lastdayname=='Sunday'): print('March') if (lastdayname=='saturday'or lastdayname=='Saturday'): print('November') if (firstdayname=='saturday'or firstdayname=='Saturday'): print('June') if (firstdayname=='sunday'or firstdayname=='Sunday'): lastdayname=input('What is the week name of the last day of the month:') if (lastdayname=='monday'or lastdayname=='Monday'): print('March') if (lastdayname=='tuesday'or lastdayname=='Tuesday'): print('November')
hi ,paul,i have a question... 👇Example: number=float(input('what's ur number?' ) 🤔in this sentence ican't use 3 apostrophe here .but if i delete the one after "What",it works EVERYONE is welcomed to answer this question ❤👀it will help me a lottt😊THANK U GUYS
thanks I used this x=int(input('input your number: ')) y=int(x/2) if(y*2==x): print('your number is even') if(y*2!=x): print('your number is odd') Is this right
Figured it out boss. But my code was a little different: x=float(input("what is your favorite number? ")) if(x%2==0): print("your number is even") if(x%2!=0): print("your number is odd")
i did the homework a bit different and i have put an extra challenge on it numb=float(input('Please enter your number: ')) if (numb%2==0): print('Your number is an even number.') if (numb%2): print('Your number is an odd number.') print('Play again.') numb1=float(input('Please enter another number: ')) if (numb1%2==0): print('Your number is an even number.') if (numb1%2==1): print('Your number is and odd number.')
I am a college student who had to put school on pause for a bunch of complicated reasons so I am currently working 10hrs a day doing IT and I really love these, when I am at my desk I can watch Mr. McWhorter with a cup of black coffee and I can keep learning and I don't feel like I am throwing away my time Thank you. When I can afford to I will be joining your patreon to pay you for this amazing service you provide.
this is the best python tutorials i've seen on yt so far 10/10
0:00 Intro
0:58 Recap
2:17 What we are gonna learn…
6:00 1st Example
12:15 2nd Example
15:16 3rd Example
17:50 Homework
20:14 Homework Solution
Its not just your teaching that I love.You want people that you barely know to learn well and excel in their lives. That much is clear from the way you motivate people to do the assigned homework. In India we call such a person a GURU.
Thanks for another great lesson. The window management your doing is great. Just the fact that you care about it says everything to me. Support this great teacher guys, he deserves it! See you next week Paul ☕😉
Thanks again!
Sir, really very fortunate to get you in TH-cam.. Learn not only code but also type of quality teaching from you.
number=float(input('Please enter your number: '))
if number%2 == 0:
print('Your number is even')
if number%2 > 0:
print('Your number is odd')
Paul, a shorter way to do it without the rem variable. Great series as usual
Thank you for your lessons:) You make Python very easy to learn!
myNumber=float(input('Please Input your number'))
if (myNumber== 7):
print('You are lucky')
if (myNumber != 7):
print('You are unlucky')
Paul you are the best!!! I adore you!!! THANK YOU!!!
Not a mathematician, but can say with a very high level of confidence that 0 is most definitely an even number.
That's my only comment about this video, everything else is great! Keep up the good work!
I felt like a genius after figuring this out on my own😂 Great Lesson!
Great job!
haha same
I am a retired pastor (75 after 50 years in the ministry. Your tutorials are the BEST! Thanks.
Wow, thank you!
I jumped over here from the Raspberry Pi lessons to get better python programming skill before continuing the Pi lessons. Thanks for all of the great material.
Smart move! Really good to get a little more python under your belt.
Assignment is completed in under 5 minutes! Thank you very much for another great lesson. Indentation and colon are very unusual for me, I have to get used to it.
Thank you so much again 🎉
Great lesson as always! I forgot about the % operator and so I the homework as shown below. Note, that I needed to keep changing the variable type to get a good, clean sentence format in my final prints.
### Homework ###
#Get number fro the user and tell user if number is even or odd.
Number = float(input('Please enter your integer: '))
x = Number / 2
y = int(x)
Numberint = int(Number)
Numberstr = str(Numberint)
if (x == y):
print('Your number,' , Numberstr + ',' , 'is an even number.')
if (x != y):
print("Your number," , Numberstr + ',' , 'is an odd number.')
I think I guessed ahead to the next lesson, but I used an 'and' condition to check if the inputted number was both greater than 0 and the remainder was equal to zero for an even number, and gave zero it's own print message because everyone is a comedian. I'm seriously loving this series, Paul!
I'll be honest I had to watch this a few times to really understand the lesson. Great Job! I'm trying to pick up all the little details an understand as you build students up.
I did it within 5 minutes!thank u Paul,my best teacher.
I was able to solve this problem! Gotta love the % function.
Another fantastic lesson! Thank you Paul for always thinking of the Absolute beginner. I really enjoy these lessons.
Another great lesson. Great breakdown of the basic "if" statement. I will pass this on to my students!
Thank you for these Mr. McWhorter, you are a God-sent.
I've managed to get this up and running on Linux Ubuntu, which is a little more involved than windows to say the least, but so far it seems to be working perfectly. This user interface is amazing and I'm looking forward to putting it thru the paces of coding process. Lots of us don't realize what's involved, when you code a program for your specific PC, and to get the results you expect depends on the software being setup properly. If you've worked with command line programs enough, you know what I'm talking about. There are lots of bad information, that's probably no intentional, being passed around that don't work because of all the different configurations for different PC's.
I did it, because I remembered what I had learned in your earlier lessons. Thanks for these lessons.
And that is the whole point. We are building a tool set, and you have to constantly think about the old tools you got in precious lessons. Good job!
Great Lesson as always..... One thing too mention is when we were entering in the color in the program remember that Red and red are seen by the computer differently. So Red != red just a heads up... Thanks as always
Hey Paul, I am an Aerospace Engineering graduate student trying to learn python and these videos have been awesome! Also, Christian and black coffee drinker here as well! 😁
LEGEND!
Got it without folding like that lawn chair! That was satisfying, the mod function does come in handy!
2nd day in a row and 6 lessons done. I love it! Thumbs up ⚡, subscribed⚡, arduino in the mail 📫and will patreon to celebrate my 100th lesson 🚀Thank you so much for sharing your knowledge, BOOM 💥☕
Hi Paul, I remembered what you said about the MOD function and worked out this homework on my own. I didn't include the "Please Play Again" but added it later. Thanks again.
Excellent!
I didn't fold, Mr. McWhorter! I got her done under 5 mins
I got it figured out. I have to say though I have had a similar HW assignment years ago, but that was for a C programming class. It's good to know that I am able to recall that old stuff plus use the new stuff that I've learned through watching your amazing videos!
Excellent!
I paused and did my homework! I knew I had to use the mod somehow but it took a while for my old brain cells to figure it out! Apart from variable names, my solution was almost identical to yours. By the way, "an" and not "and" in front of vowels.......😜
Great lessons 😊. I was able to solve the riddle in around five minutes. Thanks!
Thanks for the lesson on IF. I tried to see if a program can be written that will show if a number is divisible by 9 using the same format as you have displayed. It worked! I thumped my chest and now there seem to be two Huckleberrys running around.
love it, can't wait for the next episode!
I remembered the mod operator from earlier lessons and did the homework. Thanks
This took me longer than i'd like to admit but thought about it at work, came home, still had syntax issues but I FIGURED IT OUT!!!!
x=float(input('What number would you like to examine? '))
y=2
z=x%y
if (z == 0):
print('Your number is EVEN')
if (z != 0):
print('Your number is ODD')
I'm not an expert at anything but I do have fun at whatever I do. Just having the time of my life with the homework. Reminds me of a program I wrote in 'C' where you guessed the number with the fewest guesses to win. Fun watching people try. Have a great week.
Got homework first time. Piece of cake. Good teacher. Thanks.
Great job!
Thanx for that, got my old brain moving again. My first test was for zero and called it an "ODD" number right off the bat. Hope your move goes well.
I did it too!! Thank you!
number = float(input("Enter a number please: "))
print (f"The number ({number}) is even.") if number % 2 == 0 else print (f"The number ({number}) is odd.")
I have really been enjoying this series.
Great lesson, Paul! I figured out the homework. Took me a minute or so to figure the syntax, since I don't usually use %. However, I probably took longer to test it than it did to write. it. Thanks again!
IM LEGEND!!! I understood this SO well Paul, thank you so much you are the best teacher ever, one day I might be able to help you out at patreon and I would like to do that🙂
LEGEND!
I actually got it done but I had to see the first video . Knew it that it was just somewhere there. Thanks for the cool videos. And keep giving homeworks.
Nice work!
Hi Paul. I did the homework% I had repeated all the tutorials using Visual Studio Code so remembered the trick in finding odd or even numbers. Thanks for the challenge.
Fantastic!
Thanks!
Wow, thank you so much. You are so kind, and that is a big encouragement to me.
I did go back and review earlier lessons, good thing.... I knew I needed to check odd or even, but forgot how to format..... Good lesson. Thanks
Good stuff!
Thanks
easy
Thanks! REally appreciate that.
@@paulmcwhorter the least I can do sir.
I know that I'm a bit late to add a comment but I've only just found your Python tutorials. I used int instead of float. In your solution, you don't get a reply if you enter '4.1' but mine blows up because the input is invalid which I think is preferable. Of course, they both blow up if you enter 'banana'😁
THANK YOU SO MUCH FOR THE Homework!!!!!!!!!!!!! I used your fav operator thanks
great vids (again) .. i actually did it .. although i used "if not 0" statement for the odd check
Thanks a lot for this tutorials Mr. McWhorter, can you please start a new tutorial series guiding how to make a simple Arduino Quadcopter drone. I am trying to make my own Arduino drone, but while doing the coding, a lot of compile time errors are appearing!!!. There are many electronic hobbyists like me who are struggling to make drones. You are the most excellent tech instructor in You tube who can explain things very clearly. Hope you will accept my request.
Thanks Paul, this video really helped me ❤
I didn't ran the room like a little child. I did my homework, fun. Thank you very much.
number=float(input('Give me a number '))
if (number%2==0):
print('Your number', number, 'is even')
else:
print ('Your number', number, 'is odd')
Excellent!
Yeaaaahh!! I did a good job with the assignment sir 😎👌🏻. I didn't see yet the correction but it is perfectly working.
Edit: the only difference i used one variable X, so i did the operation inside the if statement 😁
Great 👍
Hey Paul, great stuff. Is it possible to remove the directory pathways from the terminal window? It's mighty cluttered down there and makes viewing difficult.
Nice video, entertaining and very well explained. It't nice that you don't leave anyone behind... ;-)
Thanks! 😃
I did the homework I’m so glad 😊. Thank you Sir
Excellent!
Thank you for the amazingly informative lessons.
Could you please specify starting which lesson we will need the Arduino and any cable or kits with it so that I can buy it before.
Thank you
Did my Home Work %!! used !=0
waiting for next episode
Thank you
number = float(input("Please type your number: "))
if number % 2 == 0:
print("Your number is even")
elif number % 2 != 0:
print("Your number is odd")
I did it on my own though I had to check my old notes about the mod function from the previous lessons. (I have an excel board for keeping notes through the tutorials)
To reinforce learning from past lessons, I included the number the user inputted in the response statements.
Hey Paul, great video! I was wondering if you would include some other configurations in case the user answers 'red', 'Red', and 'RED', which are all in fact 'red', just written slightly differently. Do you cover this in your next videos? Thank you so much, keep up the wonderful work!
Oh, I saw you mentioned it in the next one! :D Thanks!
That was great! Can't wait to use gui and gpio together
I did homework in very different way, it creates two variables from user input float and int then divide them both by 2 and if they are equal it means the number is even and vice versa that took me about 15 mins:
myNumber=float(input('Please Input your number: '))
myNumber=myNumber/2
myNumberInt=int(myNumber)
if (myNumber==myNumberInt):
print('Your number is even')
else:
print('Your number are odd')
No words to thank!
You are so kind!
n=int(input('Please Enter an integer: '))
if n%2==0:
print('Your integer is an EVEN number')
if n%2==1:
print('Your integer is odd')
DRY principal, Mr. McWhorter.
Managed to figure it out! I just divided the the number by 2 and saved one as an int and the other as a float. Then I just converted the int to a float and compared the two.
I did this way too!
Thanks, Paul... here is some uTube 'juice' .. great lesson as always...
I like the color theme, which one are you using?
LOL! I got it done in about 5 minutes. But to be fair, I've done a good bit of coding in the past. I'm learning this for fun and to play with my audrino when it gets here.
Hi Paul, I do not have the same text colors as you have now ( no red if or red operands or blue prints). The colors matched on tutorial 5 , but your colors changed on tutorial 6. How did you change them? I am really enjoying this tutorial. I have done all the older ones also. Keep up the great content. Thank you for the great lessons.
In testing the code, I found that even though myNumber is a ‘float’, entering a non-int crashes the program. I did some internet research and confirmed to myself that the odd/even concept only applies to “Whole” numbers
He is so cool thanks for taking the to time to teach me
I did my homework in couple of minutes but i noted a strange thing when testing. Using FLOAT on input caused the code to always return EQUAL on any number bigger than 16 digits, no matter what it was. When i used INT, it worked properly. I'd like to know more about the reasons for this peculiar oddity.
Tanks paul
Hi Paul
Why did you have to use rem, couldn’t you use myNumber to test for the remainder?
At 10:35 .Something is wrong with my programming I did the program as you exactly did but it's not working :/ it's saying Error
My first tought was to do something multiplying my number by 5 and then divideing it by 2 and lastly checking if the last digit was a 5 or a 0, but then i remebered % and my life became 2x less stressing.
I didn't pass the homework. I folded. But I'm still hanging in. Great lesson
Hello sir its great to be with you for the firs time
its M.K.Butan from Bombay India
Thanks and welcome
great info... 👌🏻 more girls should watch these excellent videos, they make great programmers...:-) thanks
I did the Homework a little different, something like this:
myNumber=float(input('Enter your number here: '))
if(myNumber%2==0):
print('Your number is even!')
if(myNumber%2==1):
print('Your number is odd!')
Thank you sir great 👍🙏
Hello Paul ,God bless you
And may God bless you as well.
I got it, thanks Paul
Paul quick question:
Coders or football players
I'm stumped! I have a previous version of Visual Studio installed containing Platformio, and I can't figure it all out to install Python. How can I remove it all and start over in Windows10?
a=float(input('Enter a Real Number: '))
b=a%2
if(b == 0):
print('Your Number is Even')
if(b == 1):
print('Your Number is Odd')
if(b != 0 and b != 1):
print('Your Number is Neither Even Nor Odd')
Finally I remembered the "%" sign while trying
took me 5 seconds to do the homework without looking at previous lessons or cheating. are you proud of me?
Yes, I am proud, because the homework required you to use not just what I taught today, but what I taught in previous lessons. Success requires you to continue to add to your tool set, and not forget the old tools you got previously. Good job.
About the homework... float doesn't make sense it should be an integer. If you use float and the input from the user is 2.2 the result will be odd. I don't like float in this case at all. My version:
# Variables
number = int(input('What is the number you want to check? '))
# Program
if (number % 2 == 0):
# The number is even
print('') # Nice formatting - blank line
print('Result:')
print('Wow! Fantastic! Your number ' + str(number) + ' is an even number!')
if (number % 2 != 0):
# The number is odd
print('') # Nice formatting - blank line
print('Result:')
print('What a bummer! Your number ' + str(number) + ' is an odd number!')
Best wishes from Belgium :-)
An extra variable for the remainder is not needed as you can see in my code :-).
Hi Paul, Im making a month guesser in python and I dont know why it don't work
heres the code
print('Month guesser')
firstdayname=input('What is the first day of the months week name: ')
if (firstdayname=='Tuesday'or'tuesday'):
print('oct')
if (firstdayname=='Wednesday'or'wednesday'):
print('may')
I figured it out
it was the or and i dont know why
print('Month guesser')
firstdayname=input('What is the week name of the first day of the month: ')
if (firstdayname=='monday'or firstdayname=='Monday'):
lastdayname=input('What is the week name of the last day of the month:')
if (lastdayname=='wednesday'or lastdayname=='Wednesday'):
print('You little booger you picked one of he 2 special months now I have to ask a special question')
fourthojuly=input('Is the forth day of this month an American Holiday')
if (forthojuly=='yes'or forthojuly=='Yes'):
print('July')
if (forthojuly=='no'or forthojuly=='No'):
print('January')
if (lastdayname=='tuesday'or lastdayname=='Tuesday'):
print('April')
if (firstdayname=='tuesday'or firstdayname=='Tuesday'):
print('October')
if (firstdayname=='wednesday'):
print('May')
if (firstdayname=='thursday'or firstdayname=='Thursday'):
lastdayname=input('What is the week name of the last day of the month:')
if (lastdayname=='thursday'or lastdayname=='Thursday'):
print('Febuary')
if (lastdayname=='saturday'or lastdayname=='Saturday'):
print('August')
if (firstdayname=='friday'or firstdayname=='Friday'):
lastdayname=input('What is the week name of the last day of the month:')
if (lastdayname=='sunday'or lastdayname=='Sunday'):
print('March')
if (lastdayname=='saturday'or lastdayname=='Saturday'):
print('November')
if (firstdayname=='saturday'or firstdayname=='Saturday'):
print('June')
if (firstdayname=='sunday'or firstdayname=='Sunday'):
lastdayname=input('What is the week name of the last day of the month:')
if (lastdayname=='monday'or lastdayname=='Monday'):
print('March')
if (lastdayname=='tuesday'or lastdayname=='Tuesday'):
print('November')
legend
Cool sir 😎
hi ,paul,i have a question...
👇Example:
number=float(input('what's ur number?' )
🤔in this sentence ican't use 3 apostrophe here .but if i delete the one after "What",it works
EVERYONE is welcomed to answer this question ❤👀it will help me a lottt😊THANK U GUYS
thanks I used this
x=int(input('input your number: '))
y=int(x/2)
if(y*2==x):
print('your number is even')
if(y*2!=x):
print('your number is odd')
Is this right
Is there an early access option for this course?
Like patreon supporters or something similar?
Nope
Figured it out boss. But my code was a little different:
x=float(input("what is your favorite number? "))
if(x%2==0):
print("your number is even")
if(x%2!=0):
print("your number is odd")
=(input('Type number to check : '))
z=int(x)%2
if(z==1):
print(' your number is odd' )
if(z==0):
print('Your number is even')
I got this
i did the homework a bit different and i have put an extra challenge on it
numb=float(input('Please enter your number: '))
if (numb%2==0):
print('Your number is an even number.')
if (numb%2):
print('Your number is an odd number.')
print('Play again.')
numb1=float(input('Please enter another number: '))
if (numb1%2==0):
print('Your number is an even number.')
if (numb1%2==1):
print('Your number is and odd number.')