Posts

Showing posts with the label Visual studio

Python Basics (Introduction)

Image
What is Programming? Just like we use Urdu or English and other languages to communicate with each other, we use a Programming language to communicate with the computer. Programming is a way to instruct the computer to perform various tasks. What is Python: Python is a simple and easy-to-understand language that feels like reading simple English.  It works on Pseudo code nature which makes it easy to learn and understandable for beginners. Features: Easy to understand = Less development time Free and open source High-level language Portable – works on Windows/Linux/Mac Syntax: The syntax of the Python programming language is  the set of rules which defines how a Python program will be written.  Python is a friendly language. It has a simple and easy-to-learn syntax. Moreover, its features are easy to use, which allows you to write short and readable code. While,  C++ is a bit complex when it comes to the simplicity of language, and it has more syntax rules. What is P...

How to add Timer in Your C++ Program:

 Use this code to add Timer in your code for Linus use clear instead of cls: #include <iomanip>  #include <iostream>  #include <stdlib.h>  #include <unistd.h>  using namespace std;     // hours, minutes, seconds of timer  int hours = 0;  int minutes = 0;  int seconds = 0;     // function to display the timer  void displayClock()  {      // system call to clear the screen      system("cls");         cout << setfill(' ') << setw(55) << "         TIMER         \n";      cout << setfill(' ') << setw(55) << " --------------------------\n";      cout << setfill(' ') << setw(29);      cout << "| " << setfill('0') << setw(2) << hours << " hrs | ";      c...