Skip to main content

Python Basics- hands on with strings

In our first exercise we will do some hands on with Python's in built methods.

        Store your own version of the message "Hello World" in a variable, and print it.




       Store your first name, in lowercase, in a variable.Using that one variable, print your name in lowercase, Titlecase, and UPPERCASE.



Choose a person you look up to. Store their first and last names in separate variables.
Use concatenation to make a sentence about this person, and store that sentence in a variable.-
Print the sentence.



Store your first name in a variable, but include at least two kinds of whitespace on each side of your name.
Print your name as it is stored.
Print your name with whitespace stripped from the left side, then from the right side, then from both sides.


So keep practicing by your own with above examples in your notebook and comment if you face any issue.

Comments

Post a Comment

Popular posts from this blog

How to use opencv-python with Darknet's YOLOv4?

Another post starts with you beautiful people 😊 Thank you all for messaging me your doubts about Darknet's YOLOv4. I am very happy to see in a very short amount of time my lovely aspiring data scientists have learned a state of the art object detection and recognition technique. If you are new to my blog and to computer vision then please check my following blog posts one by one- Setup Darknet's YOLOv4 Train custom dataset with YOLOv4 Create production-ready API of YOLOv4 model Create a web app for your YOLOv4 model Since now we have learned to use YOLOv4 built on Darknet's framework. In this post, I am going to share with you how can you use your trained YOLOv4 model with another awesome computer vision and machine learning software library-  OpenCV  and of course with Python 🐍. Yes, the Python wrapper of OpenCV library has just released it's latest version with support of YOLOv4 which you can install in your system using below command- pip install opencv-pyt...

How can I make a simple ChatBot?

Another post starts with you beautiful people! It has been a long time of posting a new post. But my friends in this period I was not sitting  where I got a chance to work with chatbot and classification related machine learning problem. So in this post I am going to share all about chatbot- from where I have learned? What I have learned? And how can you build your first bot? Quite interesting right! Chatbot is a program that can conduct an intelligent conversation based on user's input. Since chatbot is a new thing to me also, I first searched- is there any Python library available to start with this? And like always Python has helped me this time also. There is a Python library available with name as  ChatterBot   which is nothing but a machine learning conversational dialog engine. And yes that is all I want to start my learning because I always prefer inbuilt Python library to start my learning journey and once I learn this then only I move ahead for another...

How can I install and use Darknet framework in Windows?

Another post starts with you beautiful people! I hope you have enjoyed my  last post   about using real time object detection system- Yolo with keras api. In that post I mentioned that Yolo is built on Darknet framework and this framework is written on C and cuda. That's why we used Python wrapper of Darknet  framework instead of installing original framework. Many readers asked me about how can we install and use the original framework in our window machine. In this post I will try to show you the steps about this installation. Before following the steps I strongly recommend you to activate virtual env and install all libraries I have mentioned in my  last post . For this setup I have followed this original github repository-  AlexeyAB/darknet   . this repo is as same as original Darknet repo with additional Windows support. So don't forget to give a star to this repo as a token of our respect to the author. If you are reading my blog first time, th...