Commands in Python: 1)print- to print a message 2)type- to check the type or class of an object. 3)range- to generate a sequence of integers starting from 0 by default to n where n is not included in the generated numbers. 4)round- to round a number to a given precision in decimal digits. 5)input- to take input from the user. #HaveANiceDay #DataAnalytics #PythonBasics
Python Basics: Commands and Functions
More Relevant Posts
-
Commands in Python: 1)len- to get the number of items in an object. 2)for loop- to execute a set of statements by iterating over a sequence. 3)while loop- to execute a set of statements as long as the given condition is true. 4)String-used on string objects. 5)List- used to store multiple elements in a single object. #HaveANiceDay #DataAnalytics #PythonBasics
To view or add a comment, sign in
-
🐍 Day 1/30 — Print Statement in Python Today, I learned one of the most basic and essential concepts in Python how to display output using the print() function. It’s used to show messages, numbers, or results on the screen. 👇 print("Hello, Python!") Output: Hello, Python! 🧠 Tip: Always write text (strings) inside quotes " " or ' '. You can also print numbers or multiple values together, like this: print("Sum:", 5 + 3) #Python #LearnPython #PythonBasics #Scaler #CodingJourney #PythonForBeginners #30DaysOfCode #30DaysOfPythonjourney!
To view or add a comment, sign in
-
-
Today I solved an interesting Set Theory problem using Python 💻 The task was to determine whether one set is a subset, superset, or equal to another — without using any built-in functions! 🧩 Problem Statement: Write a Python program to check whether Set1 is a subset, superset, or equal to Set2. If none of these, print "No subset or superset relation". 🧠 Approach (without built-ins): #Python #DSA #CodingJourney #ProblemSolving #MERNStackDeveloper #100DaysOfCode #LearnByBuilding #CodeNewbie #ProgrammingChallenge #PythonDevelopers #LinkedInCodingCommunity
To view or add a comment, sign in
-
-
Is your Python function signature starting to look like a grocery list? In my latest video, I show how to reduce the number of arguments you pass around by using the Context Object Pattern. ✅ Cleaner APIs ✅ Easier testing ✅ Fewer bugs But... there's a catch. As I show in the video, this pattern can also make things worse if you use it the wrong way. 📺 Watch here → https://lnkd.in/eH5GpRW2 #Python #CleanCode #SoftwareDesign #ArjanCodes #DesignPatterns
To view or add a comment, sign in
-
-
💻 100 Days of Python Challenge – Day 4: loops For Loop A for loop iterates over a given sequence such as a list, tuple, string, or range. It executes a block of code once for each item in the sequence. While Loop A while loop repeatedly executes a block of code as long as a specified condition is true. It is useful when the number of iterations is not known beforehand. #Python #ForLoop #WhileLoop #PythonProgramming #100DaysOfCode #LearnPython #CodingJourney #CodeNewbie #ProgrammingBasics #PythonLoops #DeveloperInProgress
To view or add a comment, sign in
-
Is your Python function signature starting to look like a grocery list? In my latest video, I show how to reduce the number of arguments you pass around by using the Context Object Pattern. ✅ Cleaner APIs ✅ Easier testing ✅ Fewer bugs But... there's a catch. As I show in the video, this pattern can also make things worse if you use it the wrong way. 📺 Watch here → https://lnkd.in/eFq3GkT7 #Python #CleanCode #SoftwareDesign #ArjanCodes #DesignPatterns
To view or add a comment, sign in
-
-
Just eliminated an entire process with 20 lines of Python 🐍 The problem: Manually renaming hundreds of student files to match registry conventions The old way: 2-3 hours of mind-numbing clicking The new way: Run script. Get coffee. Done. python # What used to take hours now takes seconds for file in folder: new_name = transform_to_standard(file) rename(file, new_name) sanity_restored += 1 Sometimes the best process is no process. #Python #Automation #RegistryLife #WorkSmarter
To view or add a comment, sign in
-
String functions in Python: 1)isalnum()-to check whether all the characters of a given string are alphanumeric or not. 2)capitalize() -to change the first character of the string to uppercase if it’s lowercase. 3)find() -to search for a substring in a string. 4)count()- to return the count of occurrences of a substring in a string object. 5)center()- to align a string in the center. #HaveANiceDay #DataAnalytics #PythonBasics
To view or add a comment, sign in
-
Python trick: safe thread termination through an Event flag Many people simply set daemon=True and hope everything stops on its own. But that breaks control and can lead to leaks. A simpler and more reliable way is to use a shared Event to notify threads about shutdown. to learn more check python docs https://lnkd.in/eSxZ3Tds Want to discover python stuff like this, let connected 👨💻 #Python #Threading #Event
To view or add a comment, sign in
-
-
Hello connection! Exploring Python in greater detail today! I've been concentrating on functions, and I adore how straightforward yet effective they are. In essence, a function is a mini-program that performs a single task. The finest aspect? It keeps everything neat and orderly by allowing you to reuse code repeatedly. (This is known to programmers as "Don't Repeat Yourself," or DRY.) Def is the keyword that starts every function! #LearningToCode #DRYCode #Functions #Digitinstitute #Python #CodingBasics
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development