IRC log of #novawebdev for Friday, 2023-05-19

*** shmohamud has quit (Remote host closed the connection)00:26
*** shmohamud has quit (Read error: Connection reset by peer)01:32
*** shmohamu_ has quit (Ping timeout: 480 seconds)01:40
scooperGood morning tmickelson13:27
tmickelsongood morning scooper 13:27
scooperhow was your night???13:28
tmickelsongood morning fkoikoi 13:28
tmickelsongood13:28
fkoikoiGood morning tmickelson13:28
jelknertmickelson attended an awards ceremony last night, scooper, where they received an award13:29
scooperOk thank God is there any respond from the picture I sent you yesterday??13:29
scooperWow13:29
scooperCongratulation tmickelson13:29
fkoikoiwow Congratulation tmickelson13:33
tmickelsonthanks13:38
scooperYou are welcome tmickelson...13:39
fkoikoi_Good morning Jeff13:50
*** fkoikoi has quit (Ping timeout: 480 seconds)13:52
scoopertmickelson14:04
scooperNothing for us today???14:04
*** tmickelson has quit (Ping timeout: 480 seconds)14:06
jelknerscooper, fkoikoi_ hello14:08
scooperHello Jeff14:08
scooperhow are you doing???14:08
jelkneris Sahnun going to meet with you today?14:08
scooper+114:08
jelknersweet, at 3 pm your time?14:09
scooperwe have an assignment for him14:09
jelknergreat14:09
scooper+114:09
jelkneri look forward to our meeting tomorrow14:09
jelkner!agenda14:09
LittleWebsterWarning: There are no items on the agenda!14:09
*** fkoikoi_ has quit (Remote host closed the connection)14:09
jelkner!Add Celebrate our progress and talk about moving forward.14:10
LittleWebsterSuccess: "Celebrate our progress and talk about moving forward." has been added to the agenda.14:10
jelkner!agenda14:10
LittleWebsterThis is the agenda for the next meeting:14:10
LittleWebsterCelebrate our progress and talk about moving forward. (added by jelkner)14:10
jelknerscooper, do you have anything else to add to the agenda?14:10
scoopernot really except financial report14:10
jelkneradd that, please14:10
fkoikoiJeff, I greeted you but you didn't respond 14:11
jelknerLOL, yes, fkoikoi, sorry about that ;-)14:11
jelknerI'm a geek14:11
fkoikoiokay14:12
jelknerwe tend to try to minimize chat and optimize communication14:12
jelkneri realize that probably can come off as rude14:12
jelkneri don't mean to be rude14:12
scooper!add Financial Report by(Spencer Cooper)14:12
LittleWebsterSuccess: "Financial Report by(Spencer Cooper)" has been added to the agenda.14:12
jelknerBut I would prefer greetings that don't require a response14:12
fkoikoialright14:13
jelknerLike "Good day, Freena!"14:13
jelknerInstead of "How are you?"14:13
jelknerI'm not sure what you are asking in the later case.14:13
scooperJeff I have a python question for you14:13
jelknershoot14:13
scooperWhile reading the book observed this14:14
jelknerwhile waiting for scooper, i'll finish my thought for fkoikoi 14:15
jelknerfkoikoi, this is a computer science question, really.14:16
scooperI trying to figure out the question jeff14:16
jelknerlook at the following exchanges14:16
jelkner1.14:16
jelknerGood day, fkoikoi!14:16
jelknerGood day, jelkner!14:16
jelkner2.14:16
jelknerjelkner: How are you, fkoikoi?14:16
jelknerfkoikoi: I'm fine, jelkner, and you?14:17
jelknerjelkner: I'm fine too.14:17
jelknerone has two messages, the other three14:17
scooperin the terminal we have value = input = ("Enter a value")... if the value entered was integer and type(value)14:17
jelknerwhat page, scooper 14:17
jelkner?14:17
scooperthe interpreter will print the data type of the number14:18
scooperbut if it's a string it will render syntax error why??14:18
jelkneranyway, fkoikoi, the question for me is: is more information being conveyed in the longer exchange?14:18
jelknerwhich page, scooper 14:18
scooperI can find the page right now14:18
scooperbut this what what I encounter 14:18
jelkneri'll answer the question, but i want to look at the book while i do14:18
scooperOK just a minute14:19
jelknerlet's get in the habit of working together using the book as a reference14:19
jelknerit will really help us organize our conversation better14:19
jelknerthat's why i'm asking14:19
jelkneri will get in the habit of loading the book before we talk14:20
jelkneryou should do the same14:20
fkoikoiyes more information is being conveyed14:20
scooperok page 3814:21
scooperspeed = input(prompt)14:21
scooperWhat...is the airspeed velocity of an unladen swallow?14:21
scooperWhat do you mean, an African or a European swallow?14:21
scooper>>> int(speed)14:21
scooperValueError: invalid literal for int() with base 10:14:21
jelknerthen we can just say, "On page 26", Dr. chuck talk about an error ...14:21
jelkneryup, page 2614:21
jelknerthat's what i thought14:21
jelknernice14:21
scooperyes14:21
jelknerok here is what is going on...14:21
jelknerwhen you type keys on the keyboard, you generate *characters*14:22
jelknerput a sequence of characters together and you have a *string*14:22
jelknerso the only thing that can come immediately from typing keys on a keyboard is a string14:22
jelknereven if you want to type a number, like 5714:22
jelkneryou can't14:23
jelkneryou can only type the string "57"14:23
jelknerwe talked about that yesterday14:23
jelkneror the day before14:23
*** fkoikoi has quit (Remote host closed the connection)14:23
jelknernow "57" is a string that has characters that "represent" a number14:23
jelknerand we ask python to convert those digit characters into the number we want14:24
jelknerint("57")14:24
jelknerwhich will give back a number, 5714:24
jelknerbut what should int("cheese") do?14:25
jelknerhow can you convert "cheese" into a number?14:25
jelknerI don't know!14:25
jelknerand neither does Python ;-)14:25
jelknerso you get a ValueError14:25
jelknera *literal* is another name for a value14:26
jelkner57 is an integer literal14:26
jelkner"cheese" is a string literal14:26
jelknerso is "Scooper"14:26
scooperYes Jeff14:26
jelkneror "Freena"14:26
*** tmickelson has quit (Ping timeout: 480 seconds)14:27
jelknerso if you expect the variable speed to be a string with only digits14:27
jelknerlike 20014:27
jelknerbut the user (those darn users are always messing things up! ;-)14:27
jelknertypes a question instead14:27
jelkneryou get an error14:28
jelknerdoes that make sense?14:28
scooperYes Jeff14:28
scooperbut14:28
scooperI need to make something clear here14:28
scooperin Python they talked about value conversion  right.....14:28
jelkneryes14:28
scooperSince we accept input from our user14:29
scooperAnd the user done know which value to enter in our program14:29
scooperWe restrict the user by making it explicitly to python 14:29
scooperto know the kind of value to accept from the user in order to avoid the program cracking right??14:30
jelknerremember, computers are just machines14:30
jelknerthey don't "know" what their doing14:30
jelknerso we have to tell them *everything*!14:30
scooperYes I know14:30
jelknerand very clearly14:30
jelknerhold on...14:30
scooperok14:31
jelknerhttps://git.mcssliberia.org/python-team/PythonStudy/src/branch/main/PY4E/ch03/how_old.py14:37
jelknerTake a look at that, scooper 14:37
jelknerDr. Chuck is introducing you to try ... except14:37
jelkneri am showing you another way, that just uses a while loop14:38
jelknerage.isnumeric() is returns a boolean14:39
jelknerthat means True or False14:39
scooperyes I went through the program14:39
jelknerso if you run this program14:39
jelknerand type only digits the first time14:39
jelknerthe loop body will never execute14:39
jelknerand it will just tell you "Great.."14:40
jelknerbut if you type sixty-three14:40
jelknerinstead of 6314:40
jelknerit will enter the loop body and prompt you again14:40
jelkner"Please enter only digits..."14:40
jelknerwhen it leaves the loop14:40
jelkneryou can be sure that age has *only digits* (or else you would still be in the loop)14:41
jelknerso you can run age = int(age)14:41
jelknerand be sure you won't get an error14:41
jelknersince shmohamud is here14:41
jelkneri'll leave you in his very capable hands14:42
scooperHow old are you? 10014:42
scooperGreat, your are 100 years old. Next year you'll be 101 !14:42
scooperthat was the program output14:42
jelknershmohamud, i'll see you tomorrow at the diner at 7:30 am, yes?14:42
shmohamudyes jelkner, looking forward to it :)14:42
scooperGood morning Shmohamud14:42
jelkneryes scooper now run it again try one hundred instead14:42
shmohamudGood morning scooper14:42
jelknerokie dokie, see you all tomorrow14:42
jelknerACTION signs off14:43
*** jelkner has quit (Quit: Leaving)14:43
scooperSorry yesterday from the constant off and on14:43
shmohamudfkokoi are you there?14:43
scooperBut I m stable today14:43
shmohamudgood to hear it's stable :)14:43
scooperBut fkoikoi might last long14:43
jelknerOops, sorry for barging back in14:43
jelknerlet me do one thing before i leave14:43
jelknerscooper, can you please add that item to our agenda?14:44
shmohamud+114:44
jelkneri want to make sure you remember how to do that14:44
scooperwhich one?14:44
jelkner!agenda14:44
LittleWebsterThis is the agenda for the next meeting:14:44
LittleWebsterCelebrate our progress and talk about moving forward. (added by jelkner)14:44
LittleWebsterFinancial Report by(Spencer Cooper) (added by scooper)14:44
jelkneroops, you rock, scooper 14:44
jelknerYou already did!14:44
jelknerthis is awesome14:44
jelkneryou're too fast for me14:44
jelknerok, later my dear friends14:45
scooperhahaha learning from you gradually14:45
scooperjeff14:45
jelknerACTION signs off again14:45
*** jelkner has quit (None)14:45
fkoikoiGood morning shmohamud14:45
shmohamudgood morning fkoikoi14:45
shmohamudSo, scooper, did you finish the FizzBuzz challenge question?14:46
shmohamudAnd fkoikoi, did you finish the homework?14:46
scooperYes did tried14:46
scooper+1 I did tried14:46
*** fkoikoi has quit (Remote host closed the connection)14:46
shmohamudok let's see what you have14:47
scooperstart_checking = 014:47
scooperstop_checking = 10014:47
scooperfor number in range (start_checking, stop_checking):14:47
scooper    if number <= stop_checking:14:47
scooper        number = number+114:47
scooper        if number % 3 == 0:14:47
scooper            if number % 3 == 0 and number % 5 == 0:14:47
scooper                print("FizzBuzz")14:47
scooper            print("Fizz")14:47
scooper            14:47
scooper        elif number % 5 == 0:14:47
scooper            if number % 3 == 0 and number % 5 == 0:14:47
scooper                print("FizzBuzz")14:48
scooper            print("Buzz")14:48
scooper        elif number % 3 and number % 5 == 0:14:48
scooper            print("FizzBuzz Hope it work")14:48
scooper        print(f"{number}\n")14:48
shmohamudok, this is a great start14:48
shmohamudfirst two lines, can you remove those variables and just use numbers?14:49
scooperif you insist14:49
shmohamudI think it's more readable14:49
scooperwhen those two lines are remove right???14:50
shmohamudyes14:50
fkoikoishmohamud, i my computer will soon go off, can I post my assignment?14:51
shmohamudplease post it and we can review it later14:51
scooperor number in range (0, 100):14:51
scooper    if number <= 100:14:51
scooper        number = number+114:51
scooper        if number % 3 == 0:14:51
scooper            if number % 3 == 0 and number % 5 == 0:14:51
scooper                print("FizzBuzz")14:51
scooper            print("Fizz")14:51
fkoikoialright14:51
scooper            14:51
scooper        elif number % 5 == 0:14:51
scooper            if number % 3 == 0 and number % 5 == 0:14:51
scooper                print("FizzBuzz")14:51
scooper            print("Buzz")14:51
scooper        elif number % 3 and number % 5 == 0:14:51
scooper            print("FizzBuzz Hope it work")14:51
scooper        print(f"{number}\n")14:51
shmohamudscooper, why do you need the first if statement? Doesn't the loop execute until it gets to 100 anyways, by design?14:52
fkoikoinumber = 11014:52
fkoikoifor num in range(1, number):14:52
fkoikoi    if num % 10 >= 0:14:52
fkoikoi        print (num)14:52
shmohamudvery close fkoikoi!14:53
shmohamudonly thing is you want to change the if statement to be when it's equal to 0!14:53
fkoikoinumber = 11014:53
fkoikoifor num in range(1, number):14:53
fkoikoi    if num % 10 <= 0:14:53
fkoikoi        print (num)14:53
shmohamudagain, very close!14:54
shmohamudjust I said I want all those multiples of 1014:54
shmohamuda multiple of 10 means that dividing by 10 leaves a remainder of 014:54
shmohamudthat's what the modulus operator is doing14:54
shmohamudso in this case, how should you change the if statement if we want only multiples of 10?14:55
fkoikoinumber = 11014:56
fkoikoifor num in range(1, number):14:56
fkoikoi    if num % 10 <= 0:14:56
fkoikoi        print (num)14:56
scooperfor number in range (0, 100):14:57
scooper    #if number <= 100:14:57
scooper        number = number+114:57
scooper        if number % 3 == 0:14:57
scooper            if number % 3 == 0 and number % 5 == 0:14:57
scooper                print("FizzBuzz")14:57
scooper            print("Fizz")14:57
scooper            14:57
scooper        elif number % 5 == 0:14:57
scooper            if number % 3 == 0 and number % 5 == 0:14:57
scooper                print("FizzBuzz")14:57
scooper            print("Buzz")14:57
scooper        elif number % 3 and number % 5 == 0:14:57
scooper            print("FizzBuzz Hope it work")14:57
scooper        print(f"{number}\n")14:57
shmohamudso fkoikoi, run the program and see if it works14:57
fkoikoiit only show the multiples of 1014:58
fkoikoi10, 20, 30..... 10014:58
shmohamudok that makes sense14:58
shmohamudbecause we're not looping through negative numbers14:58
shmohamudif we looped from -50 to 110, we would get non multiples of 10 when it's negative14:59
shmohamudbut you're right, this works exactly how I asked you, so great job!14:59
*** fkoikoi has quit (Quit: Leaving)14:59
shmohamudscooper, have you run your program yet?15:00
scooperyes I ran it15:00
scooperI pasted the current on already in here15:00
shmohamuddoes it work?15:00
scooperyes15:00
scooperI commented out the second line 15:01
shmohamudwhy do you have number = number + 115:01
scoopernumber is the iterating variable15:02
shmohamudwhat if you start looping at 1 instead of 0, then you could get rid of that right?15:02
scooper+1 is add each time the loop run to the  value of number to compare it, and see if it's greater than or not15:02
shmohamuddo we need to do that?15:03
scooperIf I do15:03
scoopermy program will star counting from 215:04
scooper*start15:04
shmohamudfor number in range (0, 100): 15:04
shmohamudthat's what determines where your number value comes from, right?15:05
scoopershmohamud this is your question "#Second Assignment from Shmo15:05
scooper#Print every number from 1 to 100(both included) on a new line.15:05
scooper#Numbers which are multiple of 3, print "Fizz"15:05
scooper#instead of a number. For the numbers which are multiples of 5, print15:05
scooper#"Buzz" instead of a number. For the number which is multiple of both 3 & 5, print15:05
scooper#"FizzBuzz" instead of number  "15:05
shmohamudthe first line says print every number from 1 to 10015:06
scooper+115:07
shmohamudso we don't need to add 1 everytime, it shouldn't start at 215:08
shmohamudunless I'm missing something15:08
shmohamudalso, can we move the "FizzBuzz hope it works" to the top of the if/else statements list? That way, we can remove the conditionals that check for 3 and 5. 15:09
shmohamudDoes thta make sense?15:10
scooperlet me give it a try15:10
shmohamudok15:10
scooperfor number in range (1, 100):15:12
scooper    if number <= 100:15:12
scooper        number = number+115:12
scooper        if number % 3 == 0:15:12
scooper            if number % 3 == 0 and number % 5 == 0:15:12
scooper                print("FizzBuzz")15:12
scooper            if number % 3 == 0 and number % 5 == 0:15:12
scooper                print("FizzBuzz")15:12
scooper            print("Fizz")15:12
scooper            15:12
scooper        elif number % 5 == 0:15:12
scooper            15:12
scooper            print("Buzz")15:12
scooper        elif number % 3 and number % 5 == 0:15:12
scooper            print("FizzBuzz Hope it work")15:12
scooper        print(f"{number}\n")15:12
scooperDo you notice that the program is checking from 2 instead of 1?? since I include the 1 instead of 015:13
shmohamudi'm saying, can you (1) move the "FizzBuzz Hope it work" to be on top of the first if statement (number % 3)15:13
scooperThis mean15:13
shmohamudand (2) remove the lines that are checking if number % 3 ==0 and number % 5 == 0 from the other conditionals15:13
shmohamuddoes that make sense?15:13
scooperall condition will be nested under that if statement 15:14
scooperThat mean all condition will be nested under that if statement if I take it to the top15:14
shmohamudclose, not nested, just on top of them starting with "if number % 3 == 0 and number % 5 == 0"15:14
shmohamudthen use elif statements the rest of the way down15:14
shmohamudwould you like to see the solution or are you following what I'm saying?15:15
scoopergot you15:15
scooperfor number in range (1, 100):15:16
scooper    if number % 3 == 0 and number % 5 == 0:15:16
scooper                print("FizzBuzz")15:16
scooper    elif number <= 100:15:16
scooper        number = number+115:16
scooper        if number % 3 == 0:15:16
scooper           15:16
scooper            if number % 3 == 0 and number % 5 == 0:15:16
scooper                print("FizzBuzz")15:16
scooper            print("Fizz")15:16
scooper            15:16
scooper        elif number % 5 == 0:15:16
scooper            15:16
scooper            print("Buzz")15:16
scooper        elif number % 3 and number % 5 == 0:15:16
scooper            print("FizzBuzz Hope it work")15:16
scooper        print(f"{number}\n")15:16
scooperdid I follow your instruction???15:16
scooperall you want me to remove all nested condition???15:16
shmohamudthe first line, yes15:16
shmohamudyou moved it to the top15:16
shmohamudbut why is there a condtional elif num <= 100 ?15:17
scooperyes15:17
shmohamudand why are we checking if number % 3 == 0 and number % 5 == 0 inside the other conditionals, we only need to check that once15:17
scooperelif is the second conditional that is evaluating the iterating variable, Hope I m on path base on your question15:19
shmohamuddo we need to use that elif number <= 100?15:20
shmohamudyou're on the path15:20
scoopershmohamud15:24
scooperbase on what you are asking15:24
scooperif are do it only Letter will show but the value of my output will not show15:24
scooperthis is what I mean 15:25
scooperfor number in range (1, 100):15:25
scooper    if number % 3 == 0 and number % 5 == 0:15:25
scooper        print("FizzBuzz")15:25
scooper        number = number+115:25
scooper    elif number % 3 == 0:15:25
scooper        print("Fizz")15:25
scooper    elif number % 5 == 0:15:25
scooper        print("Buzz")15:25
scooper        #print(f"{number}\n")15:25
shmohamudperfect, you're missing one thing15:25
shmohamudwhy did you comment out the print?15:26
shmohamudit should be indented outside of the elif statement15:26
shmohamudthen, the solution is perfect. Try it and lets see15:26
scooperfor number in range (1, 100):15:27
scooper    if number % 3 == 0 and number % 5 == 0:15:27
scooper        print("FizzBuzz")15:27
scooper        number = number+115:27
scooper    elif number % 3 == 0:15:27
scooper        print("Fizz")15:27
scooper    elif number % 5 == 0:15:28
scooper        print("Buzz")15:28
scooper    print(f"{number}\n")15:28
shmohamudis this working?15:28
scooperyes it print15:28
shmohamudwell done!!!15:28
scooperthis is so sweet15:28
scooperwith lesson code15:28
shmohamudDo you like the format of our lessons?15:28
scooperwith less code15:29
shmohamudoh15:29
shmohamudwith less code15:29
shmohamudyes!15:29
shmohamudisn't that awesome!15:29
shmohamudI agree!15:29
scoopershmohamud you making programming so sweet for me15:29
shmohamudAww, that makes me feel good :) You're making it sweet for me too :)15:29
shmohamudYou're the one doing the work, this is tough stuff, so be proud of yourself.15:30
shmohamud:)15:30
scooperI m proud of you because you got me doing it15:30
shmohamudThank you :)15:30
shmohamudDo you have any further questions? We knocked down that challenge question, which to me makes for a great day.15:31
scooperI will need another task before you leave15:31
shmohamudyes sir15:31
shmohamudlet me think15:32
scooperOK Programmer15:32
shmohamudhahahaha15:32
shmohamudwrite me a function that takes in a parameter (num) and returns me the number squared 15:33
shmohamudcan you do that?15:33
scooperIs the input coming from the user??15:34
shmohamudnope, you can just call the function with the value15:34
shmohamudgood question15:34
scooperI can give it a try15:35
shmohamudsounds good15:36
shmohamudany questions before I log off for the day?15:36
scooperNo Programmer15:37
scooperI appreciate the assistant you have render so far15:37
shmohamudYou're very welcome :) I appreciate the effort you're putting in to learning. We will succeed at this rate.15:38
scooperOK Bye shmohamud15:38
shmohamudbye scooper15:38
*** shmohamud has quit (Remote host closed the connection)15:39
*** scooper has quit (Quit: Leaving)16:38
*** thehedgeh0g has quit (weber.oftc.net synthon.oftc.net)16:48
*** shmohamud has quit (Remote host closed the connection)17:45
*** shmohamud has quit (Remote host closed the connection)18:11
*** shmohamud has quit (Ping timeout: 480 seconds)18:41
*** shmohamud has quit (Remote host closed the connection)19:30
*** shmohamud has quit (Ping timeout: 480 seconds)19:56
*** shmohamud has quit (Remote host closed the connection)21:01
*** shmohamud has quit (Ping timeout: 480 seconds)21:09
*** shmohamud has quit (Ping timeout: 480 seconds)21:38
*** shmohamud has quit (Remote host closed the connection)22:18
*** shmohamud has quit (Ping timeout: 480 seconds)22:27
*** shmohamud has quit (Ping timeout: 480 seconds)23:32

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!