Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyNoneOr
#python 3.6.9 #PyNoneOr:example of None object and or operator #this code is created by Rezaul Hoque on May 01,2022. #contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; #this program tries to print total payment an executive receives based on his weekly sales; if total weekly sales is above TK 1000, he receives TK 1000 plus 20% commission on his total weekly sales; if weekly sales is between below TK 1000 and TK 100,he receives TK1000; sales below TK 100 earns him nothing; def pay(arr=None): if arr is None: arr=[ ] total=sum(arr) if total>=100: if total >1000: return 1000+total*0.20 return 1000 or 0 #return 0 if __name__=='__main__': a=[100,200,300,500] show=pay(a) or 0 print(show)
run
|
edit
|
history
|
help
0
Python if condition
😚😚😚
Name
selenium -proj
Lesson8
PYTHON 3 ÖDEV :)
RANDOM NUMBER
prime_nonprime_count.py
Game4
Юра и заселение