10 Topics

Member Avatar for
Member Avatar for reddsoxy

I am self teaching myself python and I have hit a question that I can't seem to figure out dealing with raw_input. This is the code that is confusing me: print "How tall are you?", height = raw_input() print "So, you're %r tall ." % (height) I input my height …

Member Avatar for reddsoxy
1
178
Member Avatar for scott_liddle

I'm creating a program that carrys out certain things dependent on the user input. One function is to read text from a text file, another is to add text to the same text file. I'm unsure about how to add an exception handler to make sure the text input is …

Member Avatar for ihatehippies
0
208
Member Avatar for simulacrx

Hi all ; [ICODE]ask=raw_input("type the query: ") [/ICODE] when i type [ICODE]23+9[/ICODE] after this; i wanna get '32' result.. like ; [ICODE]>>>type the query: 3+5 >>>result : 8[/ICODE] this is what i want.. thank you..

Member Avatar for Gribouillis
0
247
Member Avatar for Venku Tur'Mukan

Hey, everybody, I'm a newbie at Python (2.7.1), and new to DaniWeb as well. and the apparent simplicity of Python got me interested in programming (seriously, the only thing before this was HTML). Anyway... I was taking a test and thought that after I was finished I could make an …

Member Avatar for vegaseat
0
43K
Member Avatar for rscubelek

Hey guys, I've been lurking around these forums for a few weeks now, and this website is by far the most helpful of any site I've visited as far as honing my newfound Python skills, and I figured it's time I jump in and ask some of the more specific …

Member Avatar for rscubelek
0
583
Member Avatar for Boubakr

Hi... Let's say that we have this: [CODE]somme = raw_input('1 + 1 = ') if somme == 2: print 'Good - Time For Answer: ' else: print 'False - The Right Answer is: 2 -Time For Answer:'[/CODE] So... how can we get the time for writing any things on raw_input()

Member Avatar for richieking
0
165
Member Avatar for Malinka

Dear Community, hopefully someone can explain this to me in simple terms: I would like to store raw input from a User without waiting for him to press Enter. And would it be possible to still check if the response is one of the predefined options? My raw input consists …

Member Avatar for Malinka
0
2K
Member Avatar for emma.parsons

I am new to programming in Python and I am just wondering if I could have some help. I am trying to write a program which creates diary entries for events and I am currently trying to convert the raw_input from the user into a date (yyyy/mm/dd) and time (24hr …

Member Avatar for hondros
0
222
Member Avatar for SOURP0PCORN

[code]#!C:\Python26\python.exe # Three-times-the-square-root-of-your-age.py # # This is a python program that # will input the user's name and age # the output will be 3 times the # square root of the user's name # # author: Min Ku "Peter" Joo # last revision: 02/10/2010 import os import math def …

Member Avatar for vegaseat
0
188
Member Avatar for nunos

Can someone please tell me what I am doing wrong. I know this is easy, but I haven't managed to make it work properly. [code=python] overwrite = None while overwrite != 'Y'.lower() or overwrite != 'N'.lower(): overwrite = raw_input("Do you want to overwrite (Y/N)? ") [/code] It doesn't exit the …

Member Avatar for sravan953
0
1K

The End.