match..case statement in PYTHON The latest Python starting from Python 3.10, a match..case structure has been introduced as an alternative to switch..case in other languages. Syntax: match term : case pattern - 1 : action - 1 case pattern - 2 : action - 2 case pattern - 3 : action - 3 .... .... case pattern-n: action-n case _ : default-action statement - x If any pattern (pattern-1, pattern-2, pattern-3, ..., pattern-n) starting from pattern-1 is matched with the term, then the corresponding action will be performed, and after that, the statement following the match..case will execute. i.e., statement-x. If none of the patterns match, case ...
Multiply a given number by 2 without using the Multiplication Operator It is possible with the help of the operator << << is a shift left operator << is a binary and bitwise operator The Shift Left operator moves every bit of the operand towards the left and the space created at the right side(LSB) will be filled with a zero. How the shift left operator works? LSB stands for Least Significant bit MSB stands for Most Significant bit Syntax: Operand = Operand << number of bits to shifted left Examples: x=x<<1 //1 bit of x to be shifted left y=y<<2 // 2 bits of y to be shifted left Note: Performing the shift left operation for the operand by one time is equal to multiplying the operand by two. Program
What is the Incognito window in Chrome? A google chrome window for browsing privately. It is not possible to see our activity by the people who use our device With private browsing, the following information is not preserved in the browser Browsing history Cookies and site data The data entered in forms But still, the following are visible Websites which we visit Details of ISP (Internet Service Provider) How to Open Incognito Window? Open Chrome Click the three vertical dots in the top right of the browser window Select the New Incognito Window Option (OR) Ctrl + Shift+n HAPPY BROWSING PRIVATELY
Comments
Post a Comment