User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 375,229 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,251 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Views: 329 | Replies: 8
Join Date: Apr 2008
Posts: 25
Reputation: FreezeBlink is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
FreezeBlink FreezeBlink is offline Offline
Light Poster

"choose" in Python?

  #1  
May 9th, 2008
There's a function that repeatedly shows up in languages, usually with more or less the following form (Python syntax):
  1. var1 = raw_input("Input a number between one and three.")
  2.  
  3. choose var1:
  4. case "1":
  5. print "You inputted one."
  6. case "2":
  7. print "You inputted two."
  8. case "3":
  9. print "You inputted three."
Or something like that. I've also seen it called "switch." Does Python have anything like this?
Last edited by FreezeBlink : May 9th, 2008 at 7:59 pm. Reason: Added sentance on "switch"
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Python Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Python Forum

All times are GMT -4. The time now is 4:01 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC