IRC log of #novawebdev for Friday, 2023-12-22

fkoikoi_hi Mr. Cole14:04
ubuntouristfkoikoi_, Hi14:04
ubuntouristI need to step away  for just a few seconds... Be back shortly14:05
tboimahGood morning ubutourist14:05
tboimah*ubuntourist14:05
ubuntouristACTION needs to step away for a few seconds...14:06
*** Gab has quit (Read error: Connection reset by peer)14:07
*** sysadmin_ has quit (Read error: Connection reset by peer)14:07
*** fkoikoi_ has quit (Read error: Connection reset by peer)14:07
*** tboimah has quit (Remote host closed the connection)14:07
*** fkoikoi has quit (Ping timeout: 480 seconds)14:08
ubuntouristACTION is back now14:09
ubuntouristSorry 'bout that. Bad timing.14:09
ubuntouristSo, how is everyone doing this morning.14:09
scooper1We are fine14:09
fkoikoi_Good14:10
tboimahGreat and YOu14:10
mulbahGood morning Mr. Cole14:10
ubuntouristGreat! I was out making music with folks last night.14:11
ubuntouristI'm doing that a lot more recently.14:11
*** scooper has quit (Ping timeout: 480 seconds)14:11
ubuntouristSo, any Python progress or questions?14:11
*** scooper has quit (Remote host closed the connection)14:13
*** Gab has quit (Read error: Connection reset by peer)14:13
ubuntouristLooks like network troubles today...14:14
fkoikoi_will soon fix that14:15
tboimahyeah, I have one operation problem, here is it: ((5 *(25 % 13) + 100)/(2 *13)//2). pyhthon is telling me that the answer is 10.0 but when i solve the problem in my book i am getting 8.0.14:15
tboimahso can we try working it out together14:15
mulbahso Mr. Cole anything for today like question or explanation 14:15
mulbahon Python14:15
ubuntouristmulbah, I was going to share a small thought on documentation but...14:16
ubuntourist...let's look at the question from tboimah 14:17
tboimah*((5 *(25 % 13) + 100)/(2 *13)26//2)14:18
*** tboimah has quit (Remote host closed the connection)14:18
*** gabriel has quit (Remote host closed the connection)14:18
ubuntouristtboimah, the secon time you typed it it started with an asterisk... Are you sure you're 14:19
ubuntouristentering it here correctly? Because when I tried pasting ((5 *(25 % 13) + 100)/(2 *13)//2) into14:19
ubuntouristPython, I did not get either of the answers you listed. Not 10.0 and not 8.0...14:20
tboimahI make mistake on the first question here is the correct question: ((5 *(25 % 13) + 100)/(2 * 13)26//2)14:22
*** mulbah07_ has quit (Read error: Connection reset by peer)14:22
gabi do solve and get 12.0 but run it in python i got 10.014:22
tboimahubuntourist14:22
ubuntouristHold while I look at it.14:22
fkoikoiI got 12.3 after solving it14:22
*** fkoikoi_ has quit (Ping timeout: 480 seconds)14:23
ubuntouristtboimah, copy and paste it from Python. The third formula you typed has a syntax error in it.14:24
*** mulbah has quit (Ping timeout: 480 seconds)14:24
ubuntouristSo, I have three different formulas you've typed into IRC so far.14:25
ubuntouristand the last one as a syntax error.14:25
tboimahthe question is: ((5 * (25 % 13) + 100)/(2 * 13)//2)14:26
tboimahdo you get that now ubuntorist14:26
ubuntouristtboimah, I am still not getting 10.0 or 8.0 from that. Let's go to tmate on the server.14:27
svayeGood morning Mr Cole14:27
tboimahokay i just see that answer now14:28
ubuntouristsvaye, hi. We're looking at a question tboimah had about a formula that was giving him unexpected results.14:28
ubuntouristsvaye, but I think he just found out why on his own.14:28
svayethanks for the update Mr Cole14:29
ubuntouristtboimah, so can you explain your mistake and the correct answer?14:31
*** fkoikoi has quit (Read error: Connection reset by peer)14:32
*** mulbah has quit (Remote host closed the connection)14:32
*** gab has quit (Ping timeout: 480 seconds)14:33
ubuntouristssh Man7sLnZJSbERtBCunyxgKvez@lon1.tmate.io14:33
sysadmin\nick tboimah14:34
ubuntouristDue to the frequent network interruptions, 14:34
ubuntouristI suggest not wasting time changing your nicks every few seconds.14:35
tboimah_I am back online14:35
ubuntourist(But I suppose that would be confusing if everyone always has the wrong name...)14:36
ubuntouristtboimah, so can you explain your mistake and the correct answer?14:36
ubuntouristssh Man7sLnZJSbERtBCunyxgKvez@lon1.tmate.io14:36
tboimah_yeah let tmate14:36
tboimah_the mistake was the "%" sign which have to do with modulo but i was taken that to be subtraction14:37
ubuntouristEverybody drop a comment in tmate with your name so we'll know when everyone is there.14:38
ubuntouristAlso, try to keep your terminal window at 24 lines deep by 80 characters wide.14:38
ubuntouristIt messes up tmate if everyone has a different size window.14:39
*** dcammue has quit (Ping timeout: 480 seconds)14:39
ubuntouristAnd someone has a very small terminal window.14:40
tboimahMr. Cole the second inner parenthesis is 13 not 2614:50
scooperyes14:50
ubuntouristtboimah_, scooper oops. right.14:50
ubuntouristI slowly reduced the formula above following the PEMDAS rules.14:53
tboimah_yeah14:54
ubuntouristIf the window was taller we could see more than 11 lines...14:54
ubuntouristI am not sure who has the tiny window, but it shrinks it for everyone.14:54
tboimah_you see where the problem is come from now14:56
tboimah_ubuntourist14:56
*** dcammue_ has quit (Ping timeout: 480 seconds)14:56
*** mulbah has quit (Ping timeout: 480 seconds)14:56
ubuntouristThere was a change in parenthises...14:56
ubuntouristIf the window was taller we could see more than 11 lines...14:57
gabrielcan you please make it known on the order of operation, why is it or which method python using to solve this 14:58
*** scooper has quit (Read error: Connection reset by peer)14:59
ubuntouristgabriel, Python is simply using the rules established by mathematicians.14:59
ubuntouristgabriel, evaluate parenthesized expressions first. 14:59
ubuntouristgabriel, then, if there are exponents, evaluate those.15:00
ubuntouristgabriel, then from left to right, multiplication and division in the order they occur.15:00
ubuntouristgabriel, finally, from left to right, addition and subraction in the order that they occur.15:00
gabrieli did using the PEMDAS rule but i am getting 12.0 that's why15:01
ubuntouristP.E.MD.AS. = Parenthesis, Exponents, Multiplication & Division, Addition & Subtraction "PEMDAS"15:01
ubuntouristgabriel,  since we seem to have typos in the formulas, I think the error is in the typos.15:02
gabrielso where is my fault cuz i did the break down i came up with 160/13 15:02
ubuntouristgabriel, if you look on the tmate now, tou will see that I have two formulas that are nearly identical.15:03
ubuntouristBoth provided by tboimah_  One gave the answer 10.0 and the other gave the answer 3.0.15:03
ubuntouristso gabriel I am suspecting you have a typo or are missing a parenthesized set. somewhere.15:04
ubuntouristformula1 has an extra pair of parenthesis15:06
*** dcammue has quit (Remote host closed the connection)15:06
*** svaye has quit (Remote host closed the connection)15:06
gabrieli didn't do it with the machine i solve it on my own to find what i get but the answer was 12.0 after divided 160 by 1315:06
ubuntourist160 never gets divided by 13. Watch again on the tmate.15:07
ubuntouristgabriel, which one are you using: Formula 1 or 2?15:08
gabrielformula one using the PEMDAS rules15:08
ubuntouristgabriel, that will change how I break down the solution. OK. formula115:08
ubuntouristFirst, 25 % 13 15:09
gabrielis 1215:09
ubuntouristNext, add in 100: ((25 % 13) + 100)15:09
scooperMr. COle15:10
ubuntouristnext, (2 * 13)15:10
scooperthe first formula when run it will produce 10.015:11
*** fkoikoi has quit (Ping timeout: 480 seconds)15:11
scooperprint(((5 * ((25 % 13) + 100) / (2 * 13)) // 2))15:11
ubuntouristI'm breaking it down into steps because gabriel  was asking what went wrong?15:11
ubuntouristscooper, the final answers have been on the screen repeatedly. (10.0 and 3.0)15:12
gabrieli learn that in python at urinary ** and +. - have the highest proriority but in binary it15:12
gabriel* , / , //, %, +, -15:13
gabrielso can15:13
scooperGabriel symbol are not in order from highest to lower15:14
gabrielcan't the same rule be express while solving the problem using PEMDAS15:14
ubuntouristgabriel, I mentioned that modulo (remainder) has the same priority as multiplication and division. Also integer division.15:14
scooperNo15:14
ubuntouristThose are evaluated left-to-right as they occur in the formula. (After parenthesis are taken care of.)15:15
scooperParenthesis, Exponential, Multiplication, Division,Addition and Substraction last....15:15
gabrielyah but why it aren't operating on it as it's?15:15
ubuntouristAnd then, finally addition and subraction.15:15
svayeThanks Mr Cole I understand it now 15:16
ubuntouristgabriel, I'm not sure I understand the question.15:17
gabrielokay i have understand now tho thanks sir15:17
ubuntouristAh. Good. 15:18
ubuntouristSo, everyone's got it now?15:18
tboimah_((5 * ((25 % 13) + 100) / (2 * 13)) // 2)15:18
tboimah_(5 * (12 + 100) / 26 // 2)15:18
tboimah_(5 * 112 / 26 // 2)15:18
tboimah_(5 * 4.3 // 2)15:18
tboimah_(5 * 2.0) HERE is the break down of the problem15:18
gabrielyes15:18
svaye+115:18
fkoikoi+115:19
tboimah_*ubuntourist did you see that15:19
gabriel+115:19
tboimah_There is the break down of the problem15:19
ubuntouristtboimah_, yeah.15:19
ubuntouristChanging topic for a small documentation tip:15:20
ubuntouristLinux and Mac OS X both have a terminal running the "Bash" shell.15:21
tboimah_Okay15:21
ubuntouristThe "shell" knows which files are "executable" -- which files can act like commands.15:22
ubuntouristWhen you create a Python program, and give it a file name like "bla_bla_blah.py"15:23
ubuntouristyou run it using "python bla_bla_bla.py"    .... BUT ...15:23
ubuntouristyou can "help" the shell figure out how to run the program another way:15:24
gabrieli do mine by using ./bla_bla_bla.py15:24
ubuntouristgabriel, Then you are maybe already including a special line at the top of the file...15:24
gabrielafter using chmod u+x bla_bla_bla.py15:24
gabrielyah #!/usr/bin/python315:25
ubuntouristSo, is everyone already using what gabriel  is showing?15:25
dcammue_115:25
dcammue-115:25
ubuntouristgabriel, (That's what I was about to explain, but if everyone already knows it, I don't need to.)15:25
svayeI don't know it15:26
scooperplease go ahead Mr. Cole15:26
dcammueGo ahead and do so, please15:27
ubuntouristsvaye, By typing "chmod u+x bla_bla_bla.py" you are letting Bash know that it should TRY15:27
ubuntouristsvaye, to use it as a command. But, Bash needs a bit more help.15:27
svayeokay15:28
ubuntouristsvaye, Your Python program is not really in a format that the computer can run. It is not a "binary executable"15:28
ubuntouristsvaye, file. It is still a "source file" that must be interpreted by some other application that will produce binary15:28
ubuntouristsvaye, instructions. 15:29
ubuntouristsvaye, adding a special type of comment as the very first line of a file can help the Bash shell know15:29
ubuntouristsvaye, which helper application (which "interpreter") should attempt to interpret your code.15:29
ubuntouristsvaye, this special comment has a funny name because some programmers think they are comedians. ;-)15:30
*** tboimah_ has quit (Quit: Leaving)15:30
fkoikoiI don't understand what you are saying Mr. Cole 15:31
ubuntouristfkoikoi, ok... 15:32
ubuntouristfkoikoi, Computers perform opeerations using numeric, binary instructions. There are numbers that15:33
ubuntouristfkoikoi, are used as codes for "add". "save". "compare" and other very small steps in order to make a complete program.15:34
ubuntouristfkoikoi, It is difficult and time-consuming to program that way. So, people created programs that convert text15:34
ubuntouristfkoikoi, (source code) into those numbers. These are the "interpreters" and "compilers".15:35
fkoikoi+115:35
ubuntouristfkoikoi, they take "high level" human-understandable files and turn them into low-level complex binary instructions.15:36
ubuntouristfkoikoi, the Bash shell -- the thing that is automatically running every time you open a terminal15:36
ubuntouristfkoikoi, has the ability to use binary low-level compiled programs. But it cannot run human-readable programs.15:37
ubuntouristfkoikoi, /usr/bin/python3 is a binary low-level executable program that reads your human-readable python programs15:38
ubuntouristfkoikoi, that you write, and "interprets" them, converting them into the binary that the computer can use.15:38
ubuntouristfkoikoi, understanding so far?15:38
fkoikoiyeah15:39
ubuntouristfkoikoi, okay. When you create a new file -- maybe it is just a letter to a friend. Maybe it is a photograph. Maybe a music file.15:40
ubuntouristfkoikoi, these types of files are not "executable" they are not programs. 15:40
ubuntouristfkoikoi, So, they are created without the "permission" to be used as a program.15:41
ubuntouristfkoikoi, but when you create a Python program, the computer is stupid: It does not "know" that it is a program.15:41
ubuntouristfkoikoi, So Python programs are created without the "permission" to be executed.15:41
gabrieldoes python operate as c?15:42
ubuntouristfkoikoi, typing "chmod u+x" followed by the filename, changes the permission. It says "It is okay to use this as a command."15:42
ubuntouristfkoikoi, But, when you try to use it as a command, Bash looks at it, and says "But... it is not a binary file... What do you want me to do with it?15:43
ubuntouristHow am I supposed to use it like a commmand? I don't understand."15:43
ubuntouristfkoikoi, If you add a special comment to the very first line, Bash will notice it and say "Ohhhh. I understand! You REALLY15:44
ubuntouristwant me to start some OTHER program and then have THAT program read your Python program and interpret it!"15:44
ubuntouristThat special comment is called a "shebang" comment. "Shell Bang". It is the first line of a file and it begins "#!"15:46
ubuntourist#!/usr/bin/python315:46
ubuntouristmeans "Bash, do not try to read my program: Iinstead, start a program named "python3" that is in /usr/bin/ directory,15:47
ubuntouristand have THAT program try to read the rest of my file.15:47
ubuntouristThe point is that it is a good idea for you to always start your Python programs with the first line15:48
ubuntourist#!/usr/bin/python315:48
ubuntouristMicrosoft Windows won't know what that means, but Linux and Mac OS X will both understand that special comment.15:48
ubuntouristfkoikoi, so "chmod u+x filename.py" and the special "shebang" comment as the first line are tricks that Python programmers on Linux computers should know about.15:50
ubuntouristI always start my Python files with a shebang.15:50
ubuntouristgabriel, there is an alternative shebang that works also: "#!/usr/bin/env python3"15:51
fkoikoiAlright thanks Mr. Cole, I got the point 15:51
ubuntouristgabriel, I forget why I switched to that as my shebang.15:51
mulbah07_can I ask a question Mr. Cole15:51
ubuntouristmulbah, let me answer gabriel  other queestion first.15:52
gabrielokay15:52
ubuntouristgabriel, Python and C are "similar" but not quite: Python is an "interpeter". C is a "compiler". The difference:15:52
mulbahif you didn't start your python program with #!/usr/bin/env python315:53
ubuntouristC reads your source code file and does not try to run it. Instead, it produces a second file that is the "binary executable" file15:53
gabrielbut we can also do that for C #!/usr15:54
ubuntouristthat is the native language of the computer. It means that the code will run fast: The computer does not need to translate or interpret the binary file.15:54
ubuntouristPython is an "interpreter". It reads your source code every time, and converts it to binary instructions every time. It does not15:55
ubuntouristproduce a new, binary executable file.15:55
mulbahyou can copy the python program into /usr/bin and it will work as the way it should work if you use #!/usr/bin/env python315:55
ubuntouristInterpreters are slower, and less efficient in some ways. But they have the advantage of allowing you to 15:55
ubuntouristexperiment interactively. You do not have to create a program file. You can just type "python3" and start typing15:56
mulbahMr. Cole did you see my question15:57
ubuntouristpython instructions into the interpreter directly. This makes it an excellent language for teaching, learning, documenting, etc.15:57
ubuntouristmulbah, I tried to tell you to wait but your connection kept dropping.15:57
ubuntouristgabriel, did that answet your question about Python and C?15:57
gabrielyah but am some how confuse on them15:58
ubuntouristgabriel, Oh. I missed your other part of the question: No. You can't use the #! for C programs... For one thing, # is not a comment15:59
ubuntouristin "C". Also, Bash is only using #! to start "interpreters" that will always read and interpret source code. every time. 16:00
ubuntouristgabriel, I will say, for now, don't think about it too much. We will have time to dig deeper later.16:01
gabrielokay16:01
ubuntouristmulbah, answering your question: No. There is no special magic to "/usr/bin/" it is just a directory where the operating system16:03
ubuntouristkeeps the most frequently used programs. Users should NEVER just drop files into /usr/bin. But, if you did,16:03
ubuntouristmulbah, you would STILL need to "chmod u+x" and you would STILL need the "#!".16:04
ubuntouristThere are other interpreters besides Python. Bash itself is an interpreter, as is "sh" which is an older, simpler shell.16:07
ubuntouristPerl is another interpreter.16:07
gabrieldoes "chmod a+x" have effect on a file?16:08
ubuntouristSOME of the "programs" in /usr/bin/ are "source code" programs that need an interpreter.16:08
*** mulbah has quit (Read error: No route to host)16:08
ubuntouristgabriel, I use the numeric form of chmod more than I use the form you use. I don't recall "a". I know "u", "g", and "o" with "r", "w" and "x"16:09
ubuntouristgabriel, normally, when I want to make something executable, I type "chmod 755 bla_bla_bla.py"16:10
gabrielyah i was introduce to that when i firs started c16:11
ubuntouristgabriel, which is the same as "chmod ugo+rx,u+w bla_bla_bla.py"16:11
gabriel+116:12
ubuntouristgabriel, I just looked: "a" is a shortcut meaning "All users". So it is a faster way of typing "ugo" (user, group, other)16:12
gabrielas i can recall the 755 is in binary right?16:13
ubuntouristSo, "chmod a+x" would turn on the execution bit for the user who created the file, users in the same group as that person, and all other users.16:14
gabrielsue but does this seems harmful to do such on a system file that is being operate16:14
ubuntouristgabriel, 755 is octal for 111101101. Split it into three parts: 111   101   101 and match them with letters rwx:16:15
ubuntourist111 = rwx. 101 = r-x16:15
ubuntouristSo 755 = 111101101 = rwxr-xr-x = The main user has read, write and execute permission,16:16
ubuntouristmembers of the group and the rest of the users only have read and execute. They cannot write to the file.16:16
gabriel+116:16
ubuntouristgabriel, /usr/bin is a directory designed to hold files that should be readable and executable by all users.16:17
ubuntouristWhen you type "vim" or click on an icon for "hexchat" or "firefox" or "terminal",16:18
ubuntouristyou are just a "regular user" running a program that all other regular users should be able to run.16:18
ubuntouristgabriel, if you are on the server at the same time as fkoikoi or tboimah or scooper, you should all be able to start16:19
ubuntouristediting your own files with vim or testing your own programs with Python.16:20
ubuntouristSo /usr/bin/vim, and /usr/bin/python3 need to have that magic "x" for all users.16:20
ubuntouristgabriel, it CAN be dangerous to grant permissions to all users --- especially "w" (write) permission:16:21
ubuntouristgabriel, if you give me write permissions to your files, I can delete your files, edit your files, rename your files, etc.16:22
ubuntouristgabriel, and you will not know until I've ruined your life.16:22
gabrielokay i understand16:22
gabrielthat was my major concern16:23
ubuntouristgabriel, but when you use programs like "apt install" to set up new applications, "apt" will put files in the right 16:23
ubuntouristdirectories, and set the correct permissions.... IF you trust your repository.16:23
ubuntouristWhen you "apt install" your system connects to the official Ubuntu server that distributes software.16:24
ubuntouristIf that server is hacked, then you're downloading and installing trouble.16:24
ubuntouristAnd if you decide to use a different "repository server" and get some of your packages from another source,16:25
gabrielso how can i prevent myself from that because i do such more often16:25
ubuntouristyou should be careful to try to determine if you can trust that source.16:25
ubuntouristgabriel, you mean you use "apt install" a lot? If you have not told "apt" to use a different repository, you are pretty safe.16:26
gabrieli use my github repository16:27
gabriellike after cloning and wanna work on the repo16:28
ubuntouristgabriel, GitHub does a pretty good job of keeping permissions set only for the user of the account.16:29
ubuntouristgabriel, Your code will be readable, but no one except you should be able to change it unless you add 16:29
ubuntouristgabriel, people as contributors or co-developers.16:30
gabrieli did that once when i was working on c_simple shell project16:30
*** dcammue has quit (Quit: Leaving)16:31
ubuntouristgabriel, If you create a repository on GitHub (or GitLab, or Codeberg or some other web service) 16:31
gabrielcuz i am not good in c so i ask my friend to join me on it16:31
ubuntouristgabriel, and you want others to work with you, you can do it two different ways: 16:32
ubuntouristgabriel, 1. add them as a collaborator.  -- OR16:32
ubuntouristgabriel, 2, Tell them to make a "fork" of your project, and work independently. When they have improved your code,16:33
ubuntouristgabriel, they send you a "pull request" and the explain what they have done. You can look at their request and16:33
*** gabriel has quit (Quit: Leaving)16:34
ubuntouristgabriel, decide "Yes, I like your changes to my code" or "No. I reject your pull request."16:34
ubuntouristACTION waits to see if gabriel is returning.16:35
ubuntouristI hope I haven't bored everyone else...16:36
fkoikoinot really16:36
ubuntouristfkoikoi, And I hope I haven't confused everyone else either. 😉16:37
fkoikoiMr. Cole, next week Monday which is the 25 of December is a holiday16:37
fkoikoino we were just waiting for you to finish answer gabriel question16:37
fkoikoi**answering*16:38
ubuntouristfkoikoi, Oh, RIGHT: I wanted to tell everone that I will also be gone next Friday December 30. So nothing next week.16:38
ubuntourist(I will check e-mail and answer questions, but no IRC / Hexchat.)16:38
fkoikoiokay, Thanks for the update16:39
ubuntouristAnyway, I was finished with gabriel's question.16:39
ubuntourist(I think.)16:39
ubuntouristWell, we've gone for a long time today. I will need to quit to get ready for something else happening in 20 minutes.16:40
fkoikoiokay16:40
fkoikoiHave a nice day Mr. Cole16:41
ubuntouristIf you have questions during the week, send e-mail and I'll try to get to them.16:41
ubuntouristBye for now everyone!16:41
fkoikoisure, thanks16:41
*** ubuntourist has quit (Quit: Leaving)16:41
*** svaye has quit (Quit: Leaving)16:42
*** fkoikoi has quit (Quit: Leaving)16:51
*** tboimah has quit (Quit: Leaving)16:57
*** scooper has quit (Ping timeout: 480 seconds)17:01
scooperHello Shmohamud21:27
shmohamudHi Scooper21:27
shmohamudSelect 5 code segments from among ), print(, (, input(, ;, "Please enter a float: "), int( and float(, and arrange them to complete the right hand side of the assignment statement with an expression that asks the user for a float value and assigns it to the magnitude variable.21:29
*** shmohamud has quit (Remote host closed the connection)21:32
scoopersomething like this21:34
scoopermagnitude = float(input("Please enter a float:"))21:34
scooperprint(magnitude)21:34
shmohamudperfect, well done21:35
shmohamudWhich of the following evaluate to 0?21:36
shmohamudA. __ 4 - 3 // 2 - 321:36
shmohamudB. __ 1 ** 2 - 7 // 321:36
shmohamudC. __ 4 / 2 + 2 ** 021:36
shmohamudD. __ 2 // 5 * 3 ** 421:36
scooperShould I run the code21:36
scooperor just analyze it and give the answer21:36
shmohamudjust by looking at it21:36
shmohamudanalyze21:36
scooperok21:36
scooperA21:37
scooperNOT SURE BUT A21:38
scooperThought I know the PEMDAS principle but look at the program and doing off head seen challenging...21:39
scooper*looking21:39
scooperAre you still there???21:41
scooperC21:42
scooperI m sure c is the correct answer21:42
shmohamudOk21:43
shmohamudA is correct21:43
shmohamudThere's one more21:43
scooperWOw21:43
scooperI did great job there21:43
shmohamudyup but C does not evaluate to 0. Do you see the other one that does?21:45
scooperyes21:46
scooperSo my question here is... went I m taking my test and see question like this will I m execute the code in my editor to confirm the answer before selecting21:47
shmohamudI don't think you will be allowed to run the code in the editor21:47
shmohamudThat would make the questions too easy21:47
scooperhmmm I see21:48
scooperThat mean I have to starting doing so basis math stuff off head21:48
scooper*some21:48
shmohamudyes or with paper and pencil I think is fine21:49
scooperOK21:49
shmohamuddo you see the other answer?21:51
scooperNo I didn't run the program in any editor21:51
scooperYou instructed me not to do such21:52
shmohamudYou should be able to know the answer without running the code21:53
shmohamudA was zero, do you see another than evaluates to zero?21:53
scooperplease paste the question again21:53
scooperI stroking but not seen it21:53
scooperThen I can response to your questions please..21:54
scooperSahnun Monday is Christmas I would be able to come online21:55
shmohamudA. __ 4 - 3 // 2 - 321:56
shmohamudB. __ 1 ** 2 - 7 // 321:56
shmohamudC. __ 4 / 2 + 2 ** 021:56
shmohamudD. __ 2 // 5 * 3 ** 421:56
shmohamudWhich of the above\ evaluate to 0?21:56
shmohamudMonday you will be available or not?21:57
scooperI will not21:57
shmohamudOk, that's fine21:57
scooperC22:02
shmohamudNot C22:03
shmohamud4/2 + 2**0 equals 322:03
scooperAccording to the order of precedence which state PEMDAS22:04
scooper2 and 0 will be executed first22:04
scooperwhich will be zero22:05
shmohamud2**0 equals 122:05
scoopertwo exponential zero is one??22:05
scooperthought it's zero22:06
shmohamudanything to the 0 power is 122:06
*** scooper has quit (Quit: Leaving)22:07
*** shmohamud has quit (Remote host closed the connection)22:10
*** shmohamud has quit (Remote host closed the connection)22:49

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