Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,151,601 members, 7,812,961 topics. Date: Monday, 29 April 2024 at 11:58 PM |
Nairaland Forum / Science/Technology / Programming / MY JOURNEY WITH PYTHON!!! (6286 Views)
My Journey To The Programming World - Newbie / Learn How To Create Websites With Python(Django Web Framework) / Data Science With Python Tutorial (2) (3) (4)
Re: MY JOURNEY WITH PYTHON!!! by Humchi(m): 5:53pm On Aug 19, 2018 |
Darivie04: heehheee modules and libraries are pretty much the same. The issue is different languages use it interchangly. C language call it library python call it module. You can call pygame a module or library. Being more precise in python, you say it is module. 1 Like 1 Share |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 6:08pm On Aug 19, 2018 |
Darivie04:So true, it depends on individual and their learning skills. But, the reason why I sometimes support videos is that, if one is a self-taught programmer. There are some words that you may not know the pronunciation. Take for instance operation // for flow division. Well it may also depend on how comprehensive the PDF document is. 1 Like 1 Share |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 6:13pm On Aug 19, 2018 |
sparkle6:what version? I also encounter same problem. |
Re: MY JOURNEY WITH PYTHON!!! by sparkle6(m): 6:21pm On Aug 19, 2018 |
cutegentility:i have the update microsoft 2015 men. But i think i will download the zip file. |
Re: MY JOURNEY WITH PYTHON!!! by Nobody: 7:00pm On Aug 19, 2018 |
cutegentility:That's true though |
Re: MY JOURNEY WITH PYTHON!!! by youngds: 7:27pm On Aug 19, 2018 |
Humchi: I'm sorry my bad.. |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 7:50pm On Aug 19, 2018 |
sparkle6:You may try the zip file |
Re: MY JOURNEY WITH PYTHON!!! by Humchi(m): 10:21pm On Aug 19, 2018 |
Re: MY JOURNEY WITH PYTHON!!! by olamil34(m): 11:58pm On Aug 19, 2018 |
cutegentility: Dropbox, nairaland |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 6:05am On Aug 20, 2018 |
olamil34:Waoh, nice one. I never knew nairaland use this. Amazing |
Re: MY JOURNEY WITH PYTHON!!! by youngds: 8:11am On Aug 20, 2018 |
Humchi:Lol Typical nairalander |
Re: MY JOURNEY WITH PYTHON!!! by greatface(m): 2:22pm On Aug 20, 2018 |
Humchi: youngds: Both of you should be calm and learn or maybe contribute positively. All I see in both of you now are learners like myself but difference is that you both are claiming guru when you haven't even scratched the surface (maybe). Python is very vast. No one claims to be perfect in it as all keeps learning new things day in day out. |
Re: MY JOURNEY WITH PYTHON!!! by GreatAchiever1: 3:05pm On Aug 20, 2018 |
Speaking of pygame sef, has anyone ever made a decent game with it or just use it to design their codes? |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 4:36pm On Aug 20, 2018 |
GreatAchiever1:I haven't find yet, everyone will keep trying. |
Re: MY JOURNEY WITH PYTHON!!! by Humchi(m): 6:43pm On Aug 20, 2018 |
greatface: thanks sir. |
Re: MY JOURNEY WITH PYTHON!!! by Humchi(m): 8:56pm On Aug 20, 2018 |
PYTHON STRINGS: like many other programming languages, strings in python are arrays of bytes representing unicode characters. However, python does not have a character data type, a single character is simply a string with a length of 1. Square brackets can be used to access elements of the strings. Example - get the character at position 1. a = " h e l l o " p r i n t ( a [ 1 ] ) Another example. Substring. Get the character from position 2 to position 5. b = " w o r l d " p r i n t ( b [ 2 : 5 ] ) 1 Like 1 Share |
Re: MY JOURNEY WITH PYTHON!!! by Humchi(m): 9:06pm On Aug 20, 2018 |
INDENTATION: python uses indentation for blocks, instead of curly braces. Both tabs and space are supported, but the standard indentation requires standard python code to use FOUR spaces. For example: x = 1 #indented four spaces p r i n t ( x ) ________________________ |
Re: MY JOURNEY WITH PYTHON!!! by Humchi(m): 9:29pm On Aug 20, 2018 |
COMMAND-LINE STRING INPUT python allows for command line input. That means we are to ask user for input. The following example asks for user's name, then, by using the "input()" method, the program prints the name to the screen: p r i n t ( " e n t e r y o u r n a m e : " ) x = i n p u t ( ) p r i n t ( " h e l l o " + x ) save this file as demo_string_input.py, and load it through the commmand line: the program will prompt the user for a string: _____________________ ENTER YOUR NAME: _____________________ The user now enters a name like HUMCHI then the program prints it to screen with a little message: HELLO HUMCHI 1 Like 1 Share |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 1:15am On Aug 21, 2018 |
Humchi:well done job, I was so busy. 1 Like 1 Share |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 2:17am On Aug 21, 2018 |
You execute your operation by using the print statement. print("",). Take: X = 50 Y= 100 To carry out arithmetical operation, use start by typing: print("X plus Y," X+Y) print("X minus Y," X-Y) print("X divided by Y," X/Y) print("X multiply by Y," X*Y) For exponential you use double asterisk Say 10 raise to power 2 print(10^2, 10**3) For modulus division. Modulus division is just the remainder of your division. The modulus of 9 divided by 2 is 1. So, print("9 modulus 2", 9%2) Then // for floor division. It simply round off your decimal to zero. Say 20//3 equals to 9 or say 9.0 |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 2:24am On Aug 21, 2018 |
Then the assignment operator assign the value of the right side as the value of the left hand side. say Z = X + Y Z = 150. Now, the assignment operator is useful when dealing with two variables. Hence, for addition of Z and Y. You simply use the shorthand += Hence, Z +=Y Z//=Y, Z/=Y, |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 2:33am On Aug 21, 2018 |
Comparison Operators This is use to compare the values of a given variables. We use operation < Less than > Greater than == Equivalent to != not equivalent to == is used instead of one equivalent sign in comparison operator The value for this is either true or false. Take for instance, print("is Z greater than Y", Z >Y) |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 2:52am On Aug 21, 2018 |
Logical operator. We have the and, or and the not gate. In this case, you will be working on true and false. Nb: always type true as True and false as False in Python. Because it is a reserved keyword. a = True b = False For the And gate: The output is high (1) if both the inputs are high otherwise low (0). Remember we are working on binary. So, the output of and gate is always low. 1 and 0 = 0 0 and 1 = 0 1 and 1 = 1 0 and 0 = 0 For the or gate: The output is low(0) if both the inputs are low otherwise high (1). So, the output of or gate is always low. 1 or 0 = 1 0 or 1 = 1 1 or 1 = 1 0 or0 =0 The not gate is a reversal of the logic gate. If the inputs are high, the output will be low. |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 3:05am On Aug 21, 2018 |
Bitwise Operators operate on bit level. This convert your data to binary and carry out the output. e.g 1110 1010 We have the biwise And denoted by the symbol & Bitwise denoted by vertical slash |, And bitwise Xor denoted by ^. For bitwise and 1110 1010 1010 Bitwise or 1110 1010 1110 Bitwise xor 1110 1010 0100 There are left shift and right shift in bitwise operation. 1100 >> 2 becomes 0011 1100<<2 becomes 0000 |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 3:15am On Aug 21, 2018 |
The identity operator is nothing to worry about, it is use to check the value if it is either true or false in a program The last operator which is the membership set deals basically with list. It is a set of item. Note, the list identifier is to be written in capital letter Z = [a, b, c , d] We shall be dealing with this under the various data types. |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 3:20am On Aug 21, 2018 |
Data types is categorised into two, immutable and mutable. There are six data types in Python, they are: numbers, strings, tuples, lists, dictionaries and lastly, sets. Immutable character are character whose value once assigned cannot be altered. Examples are numbers, strings and tuples while the rest are mutable. 1 Like 1 Share |
Re: MY JOURNEY WITH PYTHON!!! by Snwokenk: 4:08am On Aug 21, 2018 |
what was your goal before deciding to learn python? i started in 2016 and my goal was to build crypto script that aggregated all the volumed from multiple exchanges into a buy/sell signal. it took me 2 months to be able to accomplish that. And from that I'm building a much larger project using python 3.6. once you learn python learn a little C. you don't have to use it but it'll help you become a better programmer 3 Likes 1 Share |
Re: MY JOURNEY WITH PYTHON!!! by Snwokenk: 4:12am On Aug 21, 2018 |
Humchi: better syntax is name = input("what is your name\n" ) print(f"Hello {name}" ) if you don't have python3.6+ for F strings then print("Hello {}".format(name)) |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 4:15am On Aug 21, 2018 |
Snwokenk:Waoh, I am glad to hear this, I am having many project to accomplish with python. What framework do you use? 1 Like |
Re: MY JOURNEY WITH PYTHON!!! by Snwokenk: 4:26am On Aug 21, 2018 |
For checking true and false. python is one of the languages that has a truthy/falsy concept. 0 is falsy and any number other != 0 is truthy empty data structures like list, dict, strings are falsy and non empty data structures are truthy. a variable == none will also be falsy for example d = () if d: print("it is true" ) This example will not print because the conditional evaluates to false or falsy but if d =(none) if d: print("it is true" ) this will print because d isn't empty. even though its only item is a none |
Re: MY JOURNEY WITH PYTHON!!! by Snwokenk: 4:29am On Aug 21, 2018 |
cutegentility: Twisted - for networking Pycryptodome - for cryptography I tried using Tkinter for gui but will have to overhaul and probably use pyqt5 or use a browser-based gui. (probably with reactjs) |
Re: MY JOURNEY WITH PYTHON!!! by cutegentility(m): 4:40am On Aug 21, 2018 |
Snwokenk:OK, nice one. I love programming. 2 Likes |
Hello House: Let's Do A Little PHP Using PDO / How It Feels Like To Learn Javascript In 2016 / Create Database Diagram From Oracle Database
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 47 |