Quickhubservice's Posts
Nairaland Forum › Quickhubservice's Profile › Quickhubservice's Posts
1 2 3 4 5 6 7 8 9 10 (of 10 pages)
ADDING AND REMOVING WHITESPACES IN PYTHON: Adding tabs: So in programming generally whitespaces refers to any non printing character for example spaces, tabs(paragraphs) and end of line symbols. To paragraph or as we say in programming to add a tab to any line of your code you use "\t". E.g. print(" \tpython" ) >>> python This adds a tab(four line spaces) to the string value when its printed by python. Tabs are really useful and in some IDE's they are automatically applied when writing codes involving functions, classes etc, but when we want to use it like above, its mainly to make our codes readable. Adding a new line: we use "\n" to add a new line. Just as tab, its very useful in making our output results readable and organized. print("\tpython" ) print("\n i love python".title()) >>> python >>> I Love Python Striping Whitespaces: sometimes in python extra spaces in some of our input can cause some unwanted and confusing results in some of our projects. For example, "python", "python ", " python" and " python " aren't the same thing. To remove any extra space on the right side of a string we use ."rstrip()" For the left side we use "lstriP()" for both sides we use just strip() favourite_language = "python " print(favourite_language.rstrip()) >>>"python" The above method temporarily removes the extra space just this one time to permanently remove the extra space : favourite_language = favourite_language.rstrip() This would permanently remove any space in the string value. The method above works for all strip methods |
Available boss... 16gb RAM, 256gb ROM, CORE I5, FHD touchscreen, very strong battery. Direct US 0704 606 1360 cheers
|
METHODS: from the above we got to see a bit of methods in action. A method is a function that belongs to an object. we see them and start using them from the beginning till whatever end python programming has as they are very important and are seen not only applied on strings but on variables, classes and other stuffs we will look at later on. Examples include: .upper() .Lower() .append() .remove() etc APPLYING VARIABLES IN STRINGS: To apply a variable to a string, we use the letter 'f' immediately before opening the parenthesis as done above in the examples giving. These is called the f strings. The f stands for format because python formats the string by replacing the name of any variable in a string with its value. say we have two variables with two names of a person: first_name = ("john" ) last_name = ("shit" ) we can use these variables in a string by telling python to: print(f"he said his name is {first_name.title()} {last_name.title()}" ) >>> he said his name is John Shit note: use braces{} around any variable you wanna use in any string |
Now you know a bit about variables, let me show you how to perform some cool stuffs with it. we can do some cool operations on the values stored in the variable without actually directly involving the set of data involved. E.g. message = "hello python lovers" print(message) >>> hello python lovers print(message.title()) >>> Hello Python Lovers print(message.upper()) >>> HELLO PYTHON LOVERS print(f"john said {message.upper())".title()) >>> John Said HELLO PYTHON LOVERS and many more.... The idea is that since programming is all about automation, we automate the whole process making it easier for us to use any set of data. when this message is saved in a variable, we can use it anytime without actually typing it. This can be useful when we begin working with other forms of data such as lists and dictionaries. |
STRINGS AND VARIABLES: message = "hello python lovers" In the above we have two parameters namely the variable (message) and the string ("hello python lovers" ). A variable in the simplest explanation is like a box we can use to store data (in this case a string value) in python to make it easier to carry out some tasks on those set of data later on. A string is a collection of alphabets, words or other characters. You know a string cause it's in parenthesis. So, from the above we have stored our string in the variable message meaning anytime we want to see our message displayed we just simply ask python to print(message), and we get our values displayed. There are some rules guiding the use of variables that we should take note of like: Don't use numbers before alphabets e.g. 1message, instead use message1 or message_1 Also spaces aren't allowed when defining variables instead use _ to separate your words. |
Hello, welcome to my thread. I will be sharing everything I have learnt so far since I resumed my programming journey to be a full stack developer. I will be trying to explain everything learnt so far in the simplest way for anyone to understand, this in turn helps me refresh my knowledge and at the same time motivates me to learn more. If you would like to learn python or just read stuff about it, follow the thread as I would try my best to be consistent in updating it with the simplest and brief concepts required of every beginner. To start off programming with python you would need python (obviously) and an IDE (Integrated Development Environment). The links on how to get python and pycharm IDE are below (i recommend pycharm cause its good for beginners and overall one of the best IDE's out there): https://www.youtube.com/watch?v=Kn1HF3oD19c (python installation) https://www.youtube.com/watch?v=XsL8JDkH-ec (pycharm installation) PYTHON: Python basically is a high-level programming language, that do what every other programming language does (give the computer instructions on how to run a task). The first ever code that any aspiring programmer would ever right in python would be print("hello world" ) ...... This is the simplest instruction anyone can give to a computer using python. It basically tells python to print an output result "hello world", and that's what it would do. If you've written this code then congratulations!! . |
SqueezedPant:Price tag is ₦250k boss |
It's ok... Still has some bugs. How long have you been coding? |
Price slash... Selling for 250k Send in your bids ![]() |
Price slash Now going for 250k Send in your bids |
Hello |
Send in your bids and offers |
Lilusm:Thanks ![]() |
Lovely Sunday |
Still available |
Still accepting bids |
Hello |
Make a bid |
Still available |
Now if you actually read those specs this is the PC below Price is ₦270,000(let's negotiate) Contact/WhatsApp on 0704 606 1360
|
Let me lay down the specs; Dell Latitude 7480 Screen Details 14" 16:9 LED Backlit 1920x1080 FHD Resolution Supports Dual Monitors Yes Touchscreen Yes Memory 16GB DDR4S 2x Memory Slots M.2 256GB SSD Processor Intel Core i5 6th Gen. Minimum 2.40GHz Processor Speed 2 (Dual) - Core Processor Optical Drive None Video Card Integrated/On-Board Graphics Intel HD Graphics 520 Webcam Included Yes Backlit Keyboard Yes Wireless Card & Bluetooth Wireless Card - Yes | Bluetooth - Yes USB Ports 3x USB 3.0 Ports, Nonex USB 2.0 Ports, 0x USB 3.1 Ports Audio On-Board with Speaker Realtek ALC3246 Audio In and Out 3.5mm Combo Jack Operating System Installed Windows 11 Pro Digital License Installed Power Adapter Included External Power Supply Included Additional Specifications 1x Ethernet (RJ45) 1GB Network Port(s), Serial Port - None, PS2 Ports -None, HDMI, Memory card reader Battery 90+% Battery Life - |
Let's be real, you aren't gonna use this PC to it's potential from day one of purchase till last day of using it . Its gonna serve you for your small, medium/large programming works, perfect size for you to carry around. Plays the games you throw at it(now u wanna play a serious game get a gaming PC.. it's a business PC) Will handle all the works you throw at it really fast even graphics and video editing (don't go overboard with it, there are PC's also meant for that... Hope you can afford them ). Now can it serve you in 2022... Yep, it can but only useful to a someone who knows his crafts or maybe an everyday joe who wants a solid beautiful laptop that do great things but he/she will never get to know cause he will never get to use it to it's max potential.Modified: it does some cool tricks too like the screen can go complete 180⁰ and it also touches with surround sound speakers... No need for thank you's ok ![]() |
Hello ![]() |
Hello ![]() Still active bosses |
crimewatch:Oga why na |
Bump... Quickly taking your item links ![]() |
We are still active ![]() |
.

