give a grammar and example of if statement for each of the following languages: a)perl, b)python
krishna bharath
0
Newbie Poster
Recommended Answers
Jump to PostStart here with your post Click Here
Jump to Postpython = 77777 if python: print("You picked a good language")
Jump to PostIn case you don't like multiple if/elif/else statements:
''' switch_case.py a switch/case like statement to replace multiple if/elif/else statements ''' # make input() work with Python2 and 3 try: input = raw_input except: pass def switch_case(case): return "You entered " + { '1': "one", '2': "two", '3': …
All 11 Replies
woooee
814
Nearly a Posting Maven
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
bumsfeld
413
Nearly a Posting Virtuoso
Lardmeister
461
Posting Virtuoso
Lardmeister
461
Posting Virtuoso
paladin952
0
Newbie Poster
paladin952
0
Newbie Poster
Lardmeister
461
Posting Virtuoso
bumsfeld
413
Nearly a Posting Virtuoso
HiHe
174
Junior Poster
HiHe
174
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.