fkoikoi_ | hi Mr. Cole | 14:04 |
---|---|---|
ubuntourist | fkoikoi_, Hi | 14:04 |
ubuntourist | I need to step away for just a few seconds... Be back shortly | 14:05 |
tboimah | Good morning ubutourist | 14:05 |
tboimah | *ubuntourist | 14:05 |
ubuntourist | ACTION 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 | |
ubuntourist | ACTION is back now | 14:09 |
ubuntourist | Sorry 'bout that. Bad timing. | 14:09 |
ubuntourist | So, how is everyone doing this morning. | 14:09 |
scooper1 | We are fine | 14:09 |
fkoikoi_ | Good | 14:10 |
tboimah | Great and YOu | 14:10 |
mulbah | Good morning Mr. Cole | 14:10 |
ubuntourist | Great! I was out making music with folks last night. | 14:11 |
ubuntourist | I'm doing that a lot more recently. | 14:11 |
*** scooper has quit (Ping timeout: 480 seconds) | 14:11 | |
ubuntourist | So, 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 | |
ubuntourist | Looks like network troubles today... | 14:14 |
fkoikoi_ | will soon fix that | 14:15 |
tboimah | yeah, 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 |
tboimah | so can we try working it out together | 14:15 |
mulbah | so Mr. Cole anything for today like question or explanation | 14:15 |
mulbah | on Python | 14:15 |
ubuntourist | mulbah, 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 | |
ubuntourist | tboimah, the secon time you typed it it started with an asterisk... Are you sure you're | 14:19 |
ubuntourist | entering it here correctly? Because when I tried pasting ((5 *(25 % 13) + 100)/(2 *13)//2) into | 14:19 |
ubuntourist | Python, I did not get either of the answers you listed. Not 10.0 and not 8.0... | 14:20 |
tboimah | I 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 | |
gab | i do solve and get 12.0 but run it in python i got 10.0 | 14:22 |
tboimah | ubuntourist | 14:22 |
ubuntourist | Hold while I look at it. | 14:22 |
fkoikoi | I got 12.3 after solving it | 14:22 |
*** fkoikoi_ has quit (Ping timeout: 480 seconds) | 14:23 | |
ubuntourist | tboimah, 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 | |
ubuntourist | So, I have three different formulas you've typed into IRC so far. | 14:25 |
ubuntourist | and the last one as a syntax error. | 14:25 |
tboimah | the question is: ((5 * (25 % 13) + 100)/(2 * 13)//2) | 14:26 |
tboimah | do you get that now ubuntorist | 14:26 |
ubuntourist | tboimah, I am still not getting 10.0 or 8.0 from that. Let's go to tmate on the server. | 14:27 |
svaye | Good morning Mr Cole | 14:27 |
tboimah | okay i just see that answer now | 14:28 |
ubuntourist | svaye, hi. We're looking at a question tboimah had about a formula that was giving him unexpected results. | 14:28 |
ubuntourist | svaye, but I think he just found out why on his own. | 14:28 |
svaye | thanks for the update Mr Cole | 14:29 |
ubuntourist | tboimah, 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 | |
ubuntourist | ssh Man7sLnZJSbERtBCunyxgKvez@lon1.tmate.io | 14:33 |
sysadmin | \nick tboimah | 14:34 |
ubuntourist | Due to the frequent network interruptions, | 14:34 |
ubuntourist | I suggest not wasting time changing your nicks every few seconds. | 14:35 |
tboimah_ | I am back online | 14:35 |
ubuntourist | (But I suppose that would be confusing if everyone always has the wrong name...) | 14:36 |
ubuntourist | tboimah, so can you explain your mistake and the correct answer? | 14:36 |
ubuntourist | ssh Man7sLnZJSbERtBCunyxgKvez@lon1.tmate.io | 14:36 |
tboimah_ | yeah let tmate | 14:36 |
tboimah_ | the mistake was the "%" sign which have to do with modulo but i was taken that to be subtraction | 14:37 |
ubuntourist | Everybody drop a comment in tmate with your name so we'll know when everyone is there. | 14:38 |
ubuntourist | Also, try to keep your terminal window at 24 lines deep by 80 characters wide. | 14:38 |
ubuntourist | It messes up tmate if everyone has a different size window. | 14:39 |
*** dcammue has quit (Ping timeout: 480 seconds) | 14:39 | |
ubuntourist | And someone has a very small terminal window. | 14:40 |
tboimah | Mr. Cole the second inner parenthesis is 13 not 26 | 14:50 |
scooper | yes | 14:50 |
ubuntourist | tboimah_, scooper oops. right. | 14:50 |
ubuntourist | I slowly reduced the formula above following the PEMDAS rules. | 14:53 |
tboimah_ | yeah | 14:54 |
ubuntourist | If the window was taller we could see more than 11 lines... | 14:54 |
ubuntourist | I 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 now | 14:56 |
tboimah_ | ubuntourist | 14:56 |
*** dcammue_ has quit (Ping timeout: 480 seconds) | 14:56 | |
*** mulbah has quit (Ping timeout: 480 seconds) | 14:56 | |
ubuntourist | There was a change in parenthises... | 14:56 |
ubuntourist | If the window was taller we could see more than 11 lines... | 14:57 |
gabriel | can 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 | |
ubuntourist | gabriel, Python is simply using the rules established by mathematicians. | 14:59 |
ubuntourist | gabriel, evaluate parenthesized expressions first. | 14:59 |
ubuntourist | gabriel, then, if there are exponents, evaluate those. | 15:00 |
ubuntourist | gabriel, then from left to right, multiplication and division in the order they occur. | 15:00 |
ubuntourist | gabriel, finally, from left to right, addition and subraction in the order that they occur. | 15:00 |
gabriel | i did using the PEMDAS rule but i am getting 12.0 that's why | 15:01 |
ubuntourist | P.E.MD.AS. = Parenthesis, Exponents, Multiplication & Division, Addition & Subtraction "PEMDAS" | 15:01 |
ubuntourist | gabriel, since we seem to have typos in the formulas, I think the error is in the typos. | 15:02 |
gabriel | so where is my fault cuz i did the break down i came up with 160/13 | 15:02 |
ubuntourist | gabriel, if you look on the tmate now, tou will see that I have two formulas that are nearly identical. | 15:03 |
ubuntourist | Both provided by tboimah_ One gave the answer 10.0 and the other gave the answer 3.0. | 15:03 |
ubuntourist | so gabriel I am suspecting you have a typo or are missing a parenthesized set. somewhere. | 15:04 |
ubuntourist | formula1 has an extra pair of parenthesis | 15:06 |
*** dcammue has quit (Remote host closed the connection) | 15:06 | |
*** svaye has quit (Remote host closed the connection) | 15:06 | |
gabriel | i 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 13 | 15:06 |
ubuntourist | 160 never gets divided by 13. Watch again on the tmate. | 15:07 |
ubuntourist | gabriel, which one are you using: Formula 1 or 2? | 15:08 |
gabriel | formula one using the PEMDAS rules | 15:08 |
ubuntourist | gabriel, that will change how I break down the solution. OK. formula1 | 15:08 |
ubuntourist | First, 25 % 13 | 15:09 |
gabriel | is 12 | 15:09 |
ubuntourist | Next, add in 100: ((25 % 13) + 100) | 15:09 |
scooper | Mr. COle | 15:10 |
ubuntourist | next, (2 * 13) | 15:10 |
scooper | the first formula when run it will produce 10.0 | 15:11 |
*** fkoikoi has quit (Ping timeout: 480 seconds) | 15:11 | |
scooper | print(((5 * ((25 % 13) + 100) / (2 * 13)) // 2)) | 15:11 |
ubuntourist | I'm breaking it down into steps because gabriel was asking what went wrong? | 15:11 |
ubuntourist | scooper, the final answers have been on the screen repeatedly. (10.0 and 3.0) | 15:12 |
gabriel | i learn that in python at urinary ** and +. - have the highest proriority but in binary it | 15:12 |
gabriel | * , / , //, %, +, - | 15:13 |
gabriel | so can | 15:13 |
scooper | Gabriel symbol are not in order from highest to lower | 15:14 |
gabriel | can't the same rule be express while solving the problem using PEMDAS | 15:14 |
ubuntourist | gabriel, I mentioned that modulo (remainder) has the same priority as multiplication and division. Also integer division. | 15:14 |
scooper | No | 15:14 |
ubuntourist | Those are evaluated left-to-right as they occur in the formula. (After parenthesis are taken care of.) | 15:15 |
scooper | Parenthesis, Exponential, Multiplication, Division,Addition and Substraction last.... | 15:15 |
gabriel | yah but why it aren't operating on it as it's? | 15:15 |
ubuntourist | And then, finally addition and subraction. | 15:15 |
svaye | Thanks Mr Cole I understand it now | 15:16 |
ubuntourist | gabriel, I'm not sure I understand the question. | 15:17 |
gabriel | okay i have understand now tho thanks sir | 15:17 |
ubuntourist | Ah. Good. | 15:18 |
ubuntourist | So, 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 problem | 15:18 |
gabriel | yes | 15:18 |
svaye | +1 | 15:18 |
fkoikoi | +1 | 15:19 |
tboimah_ | *ubuntourist did you see that | 15:19 |
gabriel | +1 | 15:19 |
tboimah_ | There is the break down of the problem | 15:19 |
ubuntourist | tboimah_, yeah. | 15:19 |
ubuntourist | Changing topic for a small documentation tip: | 15:20 |
ubuntourist | Linux and Mac OS X both have a terminal running the "Bash" shell. | 15:21 |
tboimah_ | Okay | 15:21 |
ubuntourist | The "shell" knows which files are "executable" -- which files can act like commands. | 15:22 |
ubuntourist | When you create a Python program, and give it a file name like "bla_bla_blah.py" | 15:23 |
ubuntourist | you run it using "python bla_bla_bla.py" .... BUT ... | 15:23 |
ubuntourist | you can "help" the shell figure out how to run the program another way: | 15:24 |
gabriel | i do mine by using ./bla_bla_bla.py | 15:24 |
ubuntourist | gabriel, Then you are maybe already including a special line at the top of the file... | 15:24 |
gabriel | after using chmod u+x bla_bla_bla.py | 15:24 |
gabriel | yah #!/usr/bin/python3 | 15:25 |
ubuntourist | So, is everyone already using what gabriel is showing? | 15:25 |
dcammue | _1 | 15:25 |
dcammue | -1 | 15:25 |
ubuntourist | gabriel, (That's what I was about to explain, but if everyone already knows it, I don't need to.) | 15:25 |
svaye | I don't know it | 15:26 |
scooper | please go ahead Mr. Cole | 15:26 |
dcammue | Go ahead and do so, please | 15:27 |
ubuntourist | svaye, By typing "chmod u+x bla_bla_bla.py" you are letting Bash know that it should TRY | 15:27 |
ubuntourist | svaye, to use it as a command. But, Bash needs a bit more help. | 15:27 |
svaye | okay | 15:28 |
ubuntourist | svaye, Your Python program is not really in a format that the computer can run. It is not a "binary executable" | 15:28 |
ubuntourist | svaye, file. It is still a "source file" that must be interpreted by some other application that will produce binary | 15:28 |
ubuntourist | svaye, instructions. | 15:29 |
ubuntourist | svaye, adding a special type of comment as the very first line of a file can help the Bash shell know | 15:29 |
ubuntourist | svaye, which helper application (which "interpreter") should attempt to interpret your code. | 15:29 |
ubuntourist | svaye, this special comment has a funny name because some programmers think they are comedians. ;-) | 15:30 |
*** tboimah_ has quit (Quit: Leaving) | 15:30 | |
fkoikoi | I don't understand what you are saying Mr. Cole | 15:31 |
ubuntourist | fkoikoi, ok... | 15:32 |
ubuntourist | fkoikoi, Computers perform opeerations using numeric, binary instructions. There are numbers that | 15:33 |
ubuntourist | fkoikoi, are used as codes for "add". "save". "compare" and other very small steps in order to make a complete program. | 15:34 |
ubuntourist | fkoikoi, It is difficult and time-consuming to program that way. So, people created programs that convert text | 15:34 |
ubuntourist | fkoikoi, (source code) into those numbers. These are the "interpreters" and "compilers". | 15:35 |
fkoikoi | +1 | 15:35 |
ubuntourist | fkoikoi, they take "high level" human-understandable files and turn them into low-level complex binary instructions. | 15:36 |
ubuntourist | fkoikoi, the Bash shell -- the thing that is automatically running every time you open a terminal | 15:36 |
ubuntourist | fkoikoi, has the ability to use binary low-level compiled programs. But it cannot run human-readable programs. | 15:37 |
ubuntourist | fkoikoi, /usr/bin/python3 is a binary low-level executable program that reads your human-readable python programs | 15:38 |
ubuntourist | fkoikoi, that you write, and "interprets" them, converting them into the binary that the computer can use. | 15:38 |
ubuntourist | fkoikoi, understanding so far? | 15:38 |
fkoikoi | yeah | 15:39 |
ubuntourist | fkoikoi, 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 |
ubuntourist | fkoikoi, these types of files are not "executable" they are not programs. | 15:40 |
ubuntourist | fkoikoi, So, they are created without the "permission" to be used as a program. | 15:41 |
ubuntourist | fkoikoi, but when you create a Python program, the computer is stupid: It does not "know" that it is a program. | 15:41 |
ubuntourist | fkoikoi, So Python programs are created without the "permission" to be executed. | 15:41 |
gabriel | does python operate as c? | 15:42 |
ubuntourist | fkoikoi, typing "chmod u+x" followed by the filename, changes the permission. It says "It is okay to use this as a command." | 15:42 |
ubuntourist | fkoikoi, 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 |
ubuntourist | How am I supposed to use it like a commmand? I don't understand." | 15:43 |
ubuntourist | fkoikoi, If you add a special comment to the very first line, Bash will notice it and say "Ohhhh. I understand! You REALLY | 15:44 |
ubuntourist | want me to start some OTHER program and then have THAT program read your Python program and interpret it!" | 15:44 |
ubuntourist | That 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/python3 | 15:46 |
ubuntourist | means "Bash, do not try to read my program: Iinstead, start a program named "python3" that is in /usr/bin/ directory, | 15:47 |
ubuntourist | and have THAT program try to read the rest of my file. | 15:47 |
ubuntourist | The point is that it is a good idea for you to always start your Python programs with the first line | 15:48 |
ubuntourist | #!/usr/bin/python3 | 15:48 |
ubuntourist | Microsoft Windows won't know what that means, but Linux and Mac OS X will both understand that special comment. | 15:48 |
ubuntourist | fkoikoi, 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 |
ubuntourist | I always start my Python files with a shebang. | 15:50 |
ubuntourist | gabriel, there is an alternative shebang that works also: "#!/usr/bin/env python3" | 15:51 |
fkoikoi | Alright thanks Mr. Cole, I got the point | 15:51 |
ubuntourist | gabriel, I forget why I switched to that as my shebang. | 15:51 |
mulbah07_ | can I ask a question Mr. Cole | 15:51 |
ubuntourist | mulbah, let me answer gabriel other queestion first. | 15:52 |
gabriel | okay | 15:52 |
ubuntourist | gabriel, Python and C are "similar" but not quite: Python is an "interpeter". C is a "compiler". The difference: | 15:52 |
mulbah | if you didn't start your python program with #!/usr/bin/env python3 | 15:53 |
ubuntourist | C reads your source code file and does not try to run it. Instead, it produces a second file that is the "binary executable" file | 15:53 |
gabriel | but we can also do that for C #!/usr | 15:54 |
ubuntourist | that 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 |
ubuntourist | Python is an "interpreter". It reads your source code every time, and converts it to binary instructions every time. It does not | 15:55 |
ubuntourist | produce a new, binary executable file. | 15:55 |
mulbah | you can copy the python program into /usr/bin and it will work as the way it should work if you use #!/usr/bin/env python3 | 15:55 |
ubuntourist | Interpreters are slower, and less efficient in some ways. But they have the advantage of allowing you to | 15:55 |
ubuntourist | experiment interactively. You do not have to create a program file. You can just type "python3" and start typing | 15:56 |
mulbah | Mr. Cole did you see my question | 15:57 |
ubuntourist | python instructions into the interpreter directly. This makes it an excellent language for teaching, learning, documenting, etc. | 15:57 |
ubuntourist | mulbah, I tried to tell you to wait but your connection kept dropping. | 15:57 |
ubuntourist | gabriel, did that answet your question about Python and C? | 15:57 |
gabriel | yah but am some how confuse on them | 15:58 |
ubuntourist | gabriel, Oh. I missed your other part of the question: No. You can't use the #! for C programs... For one thing, # is not a comment | 15:59 |
ubuntourist | in "C". Also, Bash is only using #! to start "interpreters" that will always read and interpret source code. every time. | 16:00 |
ubuntourist | gabriel, I will say, for now, don't think about it too much. We will have time to dig deeper later. | 16:01 |
gabriel | okay | 16:01 |
ubuntourist | mulbah, answering your question: No. There is no special magic to "/usr/bin/" it is just a directory where the operating system | 16:03 |
ubuntourist | keeps the most frequently used programs. Users should NEVER just drop files into /usr/bin. But, if you did, | 16:03 |
ubuntourist | mulbah, you would STILL need to "chmod u+x" and you would STILL need the "#!". | 16:04 |
ubuntourist | There are other interpreters besides Python. Bash itself is an interpreter, as is "sh" which is an older, simpler shell. | 16:07 |
ubuntourist | Perl is another interpreter. | 16:07 |
gabriel | does "chmod a+x" have effect on a file? | 16:08 |
ubuntourist | SOME 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 | |
ubuntourist | gabriel, 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 |
ubuntourist | gabriel, normally, when I want to make something executable, I type "chmod 755 bla_bla_bla.py" | 16:10 |
gabriel | yah i was introduce to that when i firs started c | 16:11 |
ubuntourist | gabriel, which is the same as "chmod ugo+rx,u+w bla_bla_bla.py" | 16:11 |
gabriel | +1 | 16:12 |
ubuntourist | gabriel, I just looked: "a" is a shortcut meaning "All users". So it is a faster way of typing "ugo" (user, group, other) | 16:12 |
gabriel | as i can recall the 755 is in binary right? | 16:13 |
ubuntourist | So, "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 |
gabriel | sue but does this seems harmful to do such on a system file that is being operate | 16:14 |
ubuntourist | gabriel, 755 is octal for 111101101. Split it into three parts: 111 101 101 and match them with letters rwx: | 16:15 |
ubuntourist | 111 = rwx. 101 = r-x | 16:15 |
ubuntourist | So 755 = 111101101 = rwxr-xr-x = The main user has read, write and execute permission, | 16:16 |
ubuntourist | members of the group and the rest of the users only have read and execute. They cannot write to the file. | 16:16 |
gabriel | +1 | 16:16 |
ubuntourist | gabriel, /usr/bin is a directory designed to hold files that should be readable and executable by all users. | 16:17 |
ubuntourist | When you type "vim" or click on an icon for "hexchat" or "firefox" or "terminal", | 16:18 |
ubuntourist | you are just a "regular user" running a program that all other regular users should be able to run. | 16:18 |
ubuntourist | gabriel, if you are on the server at the same time as fkoikoi or tboimah or scooper, you should all be able to start | 16:19 |
ubuntourist | editing your own files with vim or testing your own programs with Python. | 16:20 |
ubuntourist | So /usr/bin/vim, and /usr/bin/python3 need to have that magic "x" for all users. | 16:20 |
ubuntourist | gabriel, it CAN be dangerous to grant permissions to all users --- especially "w" (write) permission: | 16:21 |
ubuntourist | gabriel, if you give me write permissions to your files, I can delete your files, edit your files, rename your files, etc. | 16:22 |
ubuntourist | gabriel, and you will not know until I've ruined your life. | 16:22 |
gabriel | okay i understand | 16:22 |
gabriel | that was my major concern | 16:23 |
ubuntourist | gabriel, but when you use programs like "apt install" to set up new applications, "apt" will put files in the right | 16:23 |
ubuntourist | directories, and set the correct permissions.... IF you trust your repository. | 16:23 |
ubuntourist | When you "apt install" your system connects to the official Ubuntu server that distributes software. | 16:24 |
ubuntourist | If that server is hacked, then you're downloading and installing trouble. | 16:24 |
ubuntourist | And if you decide to use a different "repository server" and get some of your packages from another source, | 16:25 |
gabriel | so how can i prevent myself from that because i do such more often | 16:25 |
ubuntourist | you should be careful to try to determine if you can trust that source. | 16:25 |
ubuntourist | gabriel, 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 |
gabriel | i use my github repository | 16:27 |
gabriel | like after cloning and wanna work on the repo | 16:28 |
ubuntourist | gabriel, GitHub does a pretty good job of keeping permissions set only for the user of the account. | 16:29 |
ubuntourist | gabriel, Your code will be readable, but no one except you should be able to change it unless you add | 16:29 |
ubuntourist | gabriel, people as contributors or co-developers. | 16:30 |
gabriel | i did that once when i was working on c_simple shell project | 16:30 |
*** dcammue has quit (Quit: Leaving) | 16:31 | |
ubuntourist | gabriel, If you create a repository on GitHub (or GitLab, or Codeberg or some other web service) | 16:31 |
gabriel | cuz i am not good in c so i ask my friend to join me on it | 16:31 |
ubuntourist | gabriel, and you want others to work with you, you can do it two different ways: | 16:32 |
ubuntourist | gabriel, 1. add them as a collaborator. -- OR | 16:32 |
ubuntourist | gabriel, 2, Tell them to make a "fork" of your project, and work independently. When they have improved your code, | 16:33 |
ubuntourist | gabriel, they send you a "pull request" and the explain what they have done. You can look at their request and | 16:33 |
*** gabriel has quit (Quit: Leaving) | 16:34 | |
ubuntourist | gabriel, decide "Yes, I like your changes to my code" or "No. I reject your pull request." | 16:34 |
ubuntourist | ACTION waits to see if gabriel is returning. | 16:35 |
ubuntourist | I hope I haven't bored everyone else... | 16:36 |
fkoikoi | not really | 16:36 |
ubuntourist | fkoikoi, And I hope I haven't confused everyone else either. 😉 | 16:37 |
fkoikoi | Mr. Cole, next week Monday which is the 25 of December is a holiday | 16:37 |
fkoikoi | no we were just waiting for you to finish answer gabriel question | 16:37 |
fkoikoi | **answering* | 16:38 |
ubuntourist | fkoikoi, 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 |
fkoikoi | okay, Thanks for the update | 16:39 |
ubuntourist | Anyway, I was finished with gabriel's question. | 16:39 |
ubuntourist | (I think.) | 16:39 |
ubuntourist | Well, 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 |
fkoikoi | okay | 16:40 |
fkoikoi | Have a nice day Mr. Cole | 16:41 |
ubuntourist | If you have questions during the week, send e-mail and I'll try to get to them. | 16:41 |
ubuntourist | Bye for now everyone! | 16:41 |
fkoikoi | sure, thanks | 16: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 | |
scooper | Hello Shmohamud | 21:27 |
shmohamud | Hi Scooper | 21:27 |
shmohamud | Select 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 | |
scooper | something like this | 21:34 |
scooper | magnitude = float(input("Please enter a float:")) | 21:34 |
scooper | print(magnitude) | 21:34 |
shmohamud | perfect, well done | 21:35 |
shmohamud | Which of the following evaluate to 0? | 21:36 |
shmohamud | A. __ 4 - 3 // 2 - 3 | 21:36 |
shmohamud | B. __ 1 ** 2 - 7 // 3 | 21:36 |
shmohamud | C. __ 4 / 2 + 2 ** 0 | 21:36 |
shmohamud | D. __ 2 // 5 * 3 ** 4 | 21:36 |
scooper | Should I run the code | 21:36 |
scooper | or just analyze it and give the answer | 21:36 |
shmohamud | just by looking at it | 21:36 |
shmohamud | analyze | 21:36 |
scooper | ok | 21:36 |
scooper | A | 21:37 |
scooper | NOT SURE BUT A | 21:38 |
scooper | Thought I know the PEMDAS principle but look at the program and doing off head seen challenging... | 21:39 |
scooper | *looking | 21:39 |
scooper | Are you still there??? | 21:41 |
scooper | C | 21:42 |
scooper | I m sure c is the correct answer | 21:42 |
shmohamud | Ok | 21:43 |
shmohamud | A is correct | 21:43 |
shmohamud | There's one more | 21:43 |
scooper | WOw | 21:43 |
scooper | I did great job there | 21:43 |
shmohamud | yup but C does not evaluate to 0. Do you see the other one that does? | 21:45 |
scooper | yes | 21:46 |
scooper | So 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 selecting | 21:47 |
shmohamud | I don't think you will be allowed to run the code in the editor | 21:47 |
shmohamud | That would make the questions too easy | 21:47 |
scooper | hmmm I see | 21:48 |
scooper | That mean I have to starting doing so basis math stuff off head | 21:48 |
scooper | *some | 21:48 |
shmohamud | yes or with paper and pencil I think is fine | 21:49 |
scooper | OK | 21:49 |
shmohamud | do you see the other answer? | 21:51 |
scooper | No I didn't run the program in any editor | 21:51 |
scooper | You instructed me not to do such | 21:52 |
shmohamud | You should be able to know the answer without running the code | 21:53 |
shmohamud | A was zero, do you see another than evaluates to zero? | 21:53 |
scooper | please paste the question again | 21:53 |
scooper | I stroking but not seen it | 21:53 |
scooper | Then I can response to your questions please.. | 21:54 |
scooper | Sahnun Monday is Christmas I would be able to come online | 21:55 |
shmohamud | A. __ 4 - 3 // 2 - 3 | 21:56 |
shmohamud | B. __ 1 ** 2 - 7 // 3 | 21:56 |
shmohamud | C. __ 4 / 2 + 2 ** 0 | 21:56 |
shmohamud | D. __ 2 // 5 * 3 ** 4 | 21:56 |
shmohamud | Which of the above\ evaluate to 0? | 21:56 |
shmohamud | Monday you will be available or not? | 21:57 |
scooper | I will not | 21:57 |
shmohamud | Ok, that's fine | 21:57 |
scooper | C | 22:02 |
shmohamud | Not C | 22:03 |
shmohamud | 4/2 + 2**0 equals 3 | 22:03 |
scooper | According to the order of precedence which state PEMDAS | 22:04 |
scooper | 2 and 0 will be executed first | 22:04 |
scooper | which will be zero | 22:05 |
shmohamud | 2**0 equals 1 | 22:05 |
scooper | two exponential zero is one?? | 22:05 |
scooper | thought it's zero | 22:06 |
shmohamud | anything to the 0 power is 1 | 22: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/!