Omkar

14 posts

Omkar banner
Omkar

Omkar

@rumaleomkar01

# coding💻 📖 Building skills daily | Python learner 🐍 | Sharing mistakes, growth & wins

Katılım Eylül 2024
25 Takip Edilen1 Takipçiler
Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
24
12
129
12.6K
Python Developer
Python Developer@PythonDvz·
Drop your answer below 😃 Check out our story to find out if you were correct 🐍
Python Developer tweet media
English
32
21
178
14.1K
Omkar
Omkar@rumaleomkar01·
Example def factorial (n): if n==1 return 1 return n*factorial (n-1) Print(factorial (5)) Output -#120 So here basically if n==1 return 1 is a is a base condition If you do not give a base condition then it will become an infinite recursion.
English
0
0
2
9
Omkar
Omkar@rumaleomkar01·
🟢String methods- Changing case .upper() .lower() .title() .capitalize() Removing white space .strip() .lstrip() .strip() Find and replacing .find() .replace() Splitting and joining .split("") " ".join() String properties .isalpha() .isdigit() .isalnum() .isspace()
English
0
0
2
11
Omkar
Omkar@rumaleomkar01·
But one thing to notice is that if we take a for loop like For i in range (1,5) It will print up to 4 only bcz it acts as n-1 for last int so output will be (1,2,3,4) 🟢Pass-- pass is like timepass It does nothing it is used when syntax requires a statement but no action 🥱
English
0
0
2
13
Omkar
Omkar@rumaleomkar01·
Taking user input--allows you to take input from keyboard (input) comments--ignored by python interpreter start with # use can also use multiline comments[' ' ' or " " "] operators--Arithmetic,comparison,logical,Assignment, Membership,Identity
English
0
0
2
19
Omkar
Omkar@rumaleomkar01·
@Python_Dv option d will be correct option
English
0
0
0
177
Omkar
Omkar@rumaleomkar01·
@PythonPr Option D because tuple is immutable so if you try to assign the value into the tuple it will throw an error
English
0
0
0
41
Rony
Rony@Ronycoder·
PYTHON is difficult to learn, but not anymore! Introducing "The Ultimate Python ebook "PDF. You will get: • 74+ pages cheatsheet • Save 100+ hours on research And for 48 hrs, it's 100% FREE! To get it, just: 1. Like & RT 2. Reply "Py" 3. Follow @Ronycoder [MUST]
Rony tweet media
English
1.2K
901
2.2K
201.8K