Register if You want to join the community.
toolbar powered by Conduit
Programming Guides!
April 20, 2024, 06:51:18 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Programming Guides!
 
  Home   Forum    Forum   Help Search Arcade Site BIO Gallery Scripts Filefront Staff List Login Register  

Tutorial 5 - User Input.

Pages: [1]
  Print  
Author Topic: Tutorial 5 - User Input.  (Read 204 times)
Hondaman
Administrator
Full Member
*

Karma: +200/-0
Offline Offline

Posts: 98



View Profile WWW
« on: January 14, 2010, 10:34:08 am »

Hey there and this is the fifth Python Tutorial,
This tutorial will be on Getting user input with python and outputting it onto the screen.
Firstly open a new window and then type a random varaible name e.g. cheese
Then type equals '=' and type "input" So it should look like this -
Code:
cheese=input

What this means is that cheese is a varable that the user can input a value themselfs.
Then type "("")" In this is what the user will see so you may want to type "Enter you age... "
Then You will have the varaible with the users input.
But then there is nowhere for it to go or nothing for it to do.
So then under that type "print cheese"
This is basicly just printing the variable and there you go.

But anyway, Now that should work,
Check out the IF statment on how to make it output a little more interesting information

Thanks for viewing this tutorial.
Python Tut 5.
Your Admin: Hondaman.
Report Spam   Logged



Share on Facebook Share on Twitter



Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy