googleAd

Python for Beginners | Chapter 8 | Conditions Explained

In this chapter we will learn how condition statements work in python. 
If you are new in here, you may want to start from the beginning by following the playlist at 
https://www.youtube.com/playlist?list=PLEBST-qOOwm5us9jjYIUcOW-gZBmafdj1

The Latest Technology Trends: Virtual and Augmented Reality, Artificial Intelligence, 5G and IoT, Blockchain

The Latest Technology Trends: Virtual and Augmented Reality, Artificial Intelligence, 5G and IoT, Blockchain Technology is advancing at an unprecedented rate, and it's important for businesses, individuals, and society as a whole to stay informed about the latest trends. In this article, we'll take a closer look at some of the most significant technology trends that are shaping the future of our world. 

Virtual and augmented reality (VR and AR) have been around for a while, but they are now starting to gain traction in various industries. VR immerses users in a completely computer-generated environment, while AR superimposes digital information onto the real world. Both technologies have the potential to revolutionize industries such as gaming, education, and healthcare. For example, VR can be used to create realistic simulations for training purposes, while AR can be used to provide real-time information overlay in the field of medicine. However, the VR and AR industry is still in its infancy and there are some challenges that need to be overcome before it can be widely adopted, such as the high cost of VR headsets and the lack of standardization. 

Artificial intelligence (AI) is another technology trend that is gaining a lot of attention. AI refers to the simulation of human intelligence in machines. It includes subfields such as machine learning, natural language processing, and computer vision. AI is being used in a wide range of industries, from finance to transportation to healthcare. For example, AI is used in fraud detection in the banking sector and in self-driving cars. However, it also raises ethical concerns such as job displacement and privacy invasion. 

5G and the Internet of Things (IoT) are two more technology trends that are poised to have a significant impact on our lives. 5G is the fifth generation of mobile technology and it's faster, more reliable, and has a lower latency than 4G. It will enable a wide range of new use cases such as telemedicine and smart cities. IoT refers to the connection of devices and machines over the internet. It allows devices to communicate with each other and with the cloud, which enables new applications such as smart homes and predictive maintenance. 

Finally, blockchain is a technology trend that is gaining a lot of attention in recent years. Blockchain is a decentralized, digital ledger that can be used to record transactions across a network of computers. It is best known as the technology behind cryptocurrencies, but it has potential applications in other areas as well, such as finance, supply chain management, and voting systems. However, the adoption of blockchain technology is still in its early stages, and it faces challenges such as scalability and regulatory uncertainty. 

In conclusion, these are just a few of the technology trends that are shaping the future of our world. From virtual and augmented reality to artificial intelligence, 5G and IoT, and blockchain, these technologies are poised to have a significant impact on society and the economy. It's important to stay informed about these trends so that you can take advantage of the opportunities they present and mitigate the risks.

Course Outline for Python Beginner course

 Before learning a course, knowing the course outline will prepare you with high level concepts that you are going to learn. In this post, you are going to see the key chapter outlines you will find in many Python beginner courses. These may not be exact chapter names and also some courses may have some additions or omissions on these. But this should give you fairly a good idea on what you'll be learning. 

Chapter 1: Introduction to Python

  • What is Python?
  • Why use Python?
  • How to install and set up Python
  • Basic syntax and data types

Chapter 2: Variables and Data Types

  • Understanding variables
  • Basic data types (numbers, strings, lists, etc.)
  • Typecasting
  • Basic math operations

Chapter 3: Control Flow

  • If-else statements
  • For and while loops
  • Break and continue statements

Chapter 4: Functions

  • Defining and calling functions
  • Parameters and arguments
  • Return statement
  • Scope of variables

Chapter 5: Modules and Packages

  • Importing modules
  • Creating and using packages
  • Standard library modules

Chapter 6: File I/O

  • Opening and reading files
  • Writing to files
  • Working with CSV and JSON files

Chapter 7: Exception Handling

  • Understanding exceptions
  • Try-except-else-finally block
  • Raising exceptions

Chapter 8: Object-Oriented Programming

  • Classes and objects
  • Constructors and destructors
  • Inheritance and polymorphism

Chapter 9: Advanced Topics

  • Decorators
  • Generators
  • Lambda functions
  • List comprehensions

Chapter 10: Project Development

  • Planning and organizing a project
  • Debugging and testing
  • Deployment and distribution

Note: The above course is a brief introduction to Python language and its features. The chapters are designed to give an overview of the concepts and not a deep dive. The actual course would be much more detailed and would include examples and exercises for each chapter, and it would be run for a longer time for the students to practice and master the concepts. 

Python for Beginners - Learn Python Without IDE - 2 (Variables)

 Python beginner tutorial encourages you to learn by doing. Follow along this Python course to get started. This is Part 2 of the python full course for beginners which just gets you started by showing how to install python on your machine and write your very first program. Subsequent parts will follow shortly.

I have chosen not to use any python specific IDE (Integrated Development Environment) in this course. IDEs tend to do lots of autocomplete which hinders learning. As you get familiar with python basics, programming concepts and get comfortable writing python programs without an IDE, you will find IDEs more productive later. As a python beginner, start from the scratch. I value all feedbacks. If you liked this method of teaching or have any constructive criticism, please share that in the comments. Please subscribe to be notified of the next part of the course.

TABLE OF CONTENTS 0:00:00 Sample Programs for Mathematical operations 0:01:53 Command Prompt Tip 0:02:14 Program Data and Useful Output 0:02:43 Handling Multi-step processing and Hard-coding Elimination 0:03:08 Need for a Placeholder 0:03:39 What is a Variable? 0:03:48 Sample Programs Using Variables 0:06:35 Math operations using Variables 0:07:44 Sting concatenation using Variables 0:08:47 One last math operation Variables - Division with Decimal




Transcript:
Let us create a program that can do some mathematical operations. For that I'm going back to my folder where I was creating my Python Programs. And I will create a new program in notepad. So, I'll open notepad and I'll give a name math.py. Python programs will have an extension of dot py. So let me open this and I'll make use of the same function which is print and as mentioned before if you are calling a function, it needs to be followed by a parenthesis. The last time, we gave a string as an argument. The string was "hello world". This time we are not going to be passing a string argument. Rather, we are going to pass a numeric argument. So let us try giving a number like 3. And let us see if the print function will be able to print a number. Let's save this and exit out of here. And let us execute this program. python math.py . It was able to print out number 3. So now let's open notepad again and what if instead of printing this number, I did some math operation like an addition. Let's try it. python ... and pass the program name which is... math.py and we got our result which is 7. Going back to our program, what if I did a subtraction; say 3 minus 4. Again execute the program, I got a -1. How about division? What if I gave 16/2? Let's execute the program. If you are not very familiar with the command prompt, doing a up arrow or down arrow will bring back your previous commands that you typed. So, I'm not retyping these things. I'm just using the up arrow to bring back my previous commands. Ok, I'm going to execute this program. so we got 8.0 which is correct. So, a program consumes data, does some processing on it and creates a more useful output. In our examples, the data for our programs were hardcoded directly in the programs. However, in real world applications, the data comes from outside of the program. The data could come from an user input, or it could be coming from internet, or it could come from any external devices. Or it could very well be a file on your system. The operations performed on the data is not a simple addition of number. Data typically undergoes complex set of operations to produce the desired output. The output of the data processed in the first step is passed on to the second step and the output from the 2nd step will be passed on to the 3rd step and so on. It so appears, that the program needs some place holder to store these intermediate results from one step so that it can pass them on to the next step. To rerun our program with different set of inputs, we need to avoid hard-codings in the program. Again, we need a place holder that can source the input data from the outside world and pass on to the operational steps. This place holder is called a Variable. Variable is just a name given to a piece of memory that can be used as a temporary place holder for your data. Let us create a new program where we can make use of a variable. So, let me name this program variable.py. How do I define a variable ? It is very simple in python. Unlike other languages, where you need to first declare a variable and then make use of it later, in python you can create a variable and directly assign a value. For example, I can create a variable like welcomeString. And I can assign it to a value like "Hello World". Or I can put like a = 2 , b = 3 . All these are variables. welcomeString is a variable. and you assigned a value "Hello World". Here a is again is a variable and we assigned a value 2. b we assigned a value 3. b is a variable. Similarly you can define c and you can give a decimal value like 8.4. c is a variable again. Now that we have assigned a value to a variable, let us print them out. print ... And how do I print the value in a variable? In the argument of the print function, you just give the variable name. welcomeString. And I want to print the values, the variables a, b and c hold as well. So, let me print them up by providing the variable names within the parenthesis of the print function. print(a)... print(b) ...print(c). Ok, let's save this and execute it. python variable.py. We can see that we were able to print the value those variables were holding. Let us do something more with the variables. So far we have just printed the values of the variables. Now let us try doing some mathematical operations with these variables. In the last example, we added numbers like 3 and 4 by directly using the values but here we are going to make use of the variables that hold these values. So instead of just adding the 2 numbers, here let us add the variables like b and c. How about we assign the sum of these 2 variables to another variable say d ? d = b + c. It is not just enough that we assign the sum of b and c to d, but also to print it out. So let us print(d). So, let's see if this works. As you can see, we added the variables that contain the value 3 and 8.4 and we got the result of d which is now 11.4 (that is the sum of 8.4 and 3) . Let's go back to our program. How about some string functions? So, we know we have a variable called, welcomeString that holds the value 'Hello World'. How about we add one more variable: name and let it have the value 'Shan' . And now we want to concatenate these 2 strings. 'Hello World' and 'Shan' . How do we do that? Let us define another string: newString and let us try using the same plus operator and see if the concatenation works. welcomeSting + name and let us print this newString. Hope you are able to follow this. Let us execute this program. It was able to concatenate "Hello World" and "Shan" together. Let us go back to our program. Let us define another variable e which can be a division of b and c. b divided by c. the value of b is 3. the value of c is 8.4 . so 3 by 8.4 . Let's see what the answer is. It is 0.35. So we got our value here.

Python for Beginners - Learn Python Now Without IDE

Python Tutorial for beginners encourages you to learn by doing. Follow along this Python course to get started. This is Part 1 of the python full course for beginners which just gets you started by showing how to install python on your machine and write your very first program. Subsequent parts will follow shortly. I have chosen not to use any python specific IDE (Integrated Development Environment) in this course. IDEs tend to do lots of autocomplete which hinders learning. As you get familiar with python basics, programming concepts and get comfortable writing python programs without an IDE, you will find IDEs more productive later. As a python beginner, start from the scratch. I value all feedbacks. If you liked this method of teaching or have any constructive criticism, please share that in the comments. Please subscribe to be notified of the next part of the course.

 Welcome to the Beginner Series in learning Python. Learning Python will be one of the best decisions you have ever made. Python is a very powerful, yet simple to use programming language. You can create solutions to very complex problems with very few lines of code. Also the syntax of python is very readable and it is easier to maintain. Many top companies use Python because it improves their productivity. It is also a very portable language, meaning you can deploy it easily in multiple platforms like Windows, Linux, Mac or any of the mobile devices. For all these reasons, python is one of the most popular programming languages in the world. Without further ado, let's get started. The first step to learning python is to have a python environment where you can write and execute your python code. This environment can be in your laptop or your computer or it can be online. I recommend you setting it up on your machine first where you can write and execute your code. 

Below is my free course on python. Enjoy!


#pythonBeginner 


Installing Raspberry Pi from Canakit

 Raspberry Pi is a wonderful mini computer that consumes less power and can be a very powerful machine for a variety of projects like running your own vpn server or running a web server, media server or game server. Raspberry Pi has become more and more powerful over the years. It is extremely tiny making it very portable. We will see how to setup a Raspberry Pi device. I bought mine from Canakit. 

After burning my first Pi after heavily loading it with accessories, I decided to be a bit careful on my 2nd device. On my first Pi, I had only bought the board and I used my own power cord. This time I bought all the necessary accessaries from Canakit, including pre-installed Raspian OS, a case, heat sink, a fan and a power cord. 

Mine is a 8 GB Ram and I got a 128 GB sd card which comes with pre-installed Raspian OS. It was very easy to install the Raspberry pi board on to the case. Also installing the fans, heat sinks and connecting with the power cord was super easy. 

Below is a video demonstrating the setup. 



Kansas City Zoo - Review

 A few days back we had gone to the Kansas City Zoo, a trip that was very worthy of our time and money. 

My 4 year old enjoyed identifying all the animals she had seen on her books and Tv. This zoo is bigger than the Topeka zoo and even the St. Louis zoo. It is 202 acres in size and houses around 1700 animals; so you can plan your entire day for this zoo. 

I was really surprised to see some Polar Bear, Jelly Fish and Penguins in this zoo. However Polar bear wouldn't be bleach-white you would have seen on movies. I had thought Polar bears can live only in the Arctic and the Penguins can live only in the Antarctic. Kansas City Zoo proved it can live anywhere with the right temperature settings. 




The Penguins were in a temperature controlled glass rooms which had both snow in one section and a large swimming area in the other. 


I hadn't seen a Jelly fish so up close before, so it was a visual treat.


                                       


 The Sea Lions demonstrated some acrobatics while the their coach narrated their life story. See video below



The zoo is divided into sections where it houses animals from different geographical locations. Australia and Africa the popular ones. You can either walk across the zoo or use one of their trams. We bought a platinum pass that gave access to their African Tram, African Sky Safari, Carousel of Endangered Species, KC Zoo Railroad and the Kenyan Cruise.



African Sky Safari:


View of the Zebras from Sky Safari


Feeding the Goats in Kansas City Zoo



The Tiger:



You can buy tickets online for both admission and the rides on kansas city zoo website - https://www.kansascityzoo.org/





Python for Beginners | Chapter 8 | Conditions Explained

In this chapter we will learn how condition statements work in python.  If you are new in here, you may want to start from the beginning...