Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: input ==("word vs input == "word
Post: RE: input ==("word vs input == "word

oh, i get it! thanks
Sp00f General Coding Help 4 4,346 Apr-16-2017, 03:49 PM
    Thread: input ==("word vs input == "word
Post: input ==("word vs input == "word

Take note of line 25 and line 34. when this code is ran, the first block of code (line 25 is in this block) requires parenthesis around the multiple choices. when lower down in my code (line 34) it ...
Sp00f General Coding Help 4 4,346 Apr-15-2017, 10:05 PM
    Thread: checking if there are numbers in the string
Post: RE: checking if there are numbers in the string

oh, i see.. why put c.digit()? i tried x.digit(), and that worked as well. can you explain what this is doing?
Sp00f General Coding Help 11 8,163 Apr-05-2017, 10:56 PM
    Thread: checking if there are numbers in the string
Post: RE: checking if there are numbers in the string

(Apr-05-2017, 08:03 PM)buran Wrote: you are comparing string (the user input) with boolean (the result of isdigit and isalpha). That would always evaluates to False and your else is executed. flyTo...
Sp00f General Coding Help 11 8,163 Apr-05-2017, 08:17 PM
    Thread: checking if there are numbers in the string
Post: RE: checking if there are numbers in the string

(Apr-05-2017, 07:39 PM)buran Wrote: >>> x='test' >>> x==x.isdigit() False >>> x==x.isalpha() False >>> x.isalpha() True >>> y='123' >>> y.isdigi...
Sp00f General Coding Help 11 8,163 Apr-05-2017, 07:45 PM
    Thread: checking if there are numbers in the string
Post: RE: checking if there are numbers in the string

(Apr-05-2017, 07:20 PM)Kebap Wrote: Hi Sp00f, What do you expect your line 2 to do exactly, step by step? Same question for line 4. You can test these things easily in python interactive console. he...
Sp00f General Coding Help 11 8,163 Apr-05-2017, 07:39 PM
    Thread: checking if there are numbers in the string
Post: checking if there are numbers in the string

flyTo = input("Where would you like to fly? ") if flyTo == flyTo.isdigit():     print("You accidentally added a number") elif flyTo == flyTo.isalpha():        print("Okay, we are going to {} ".format(...
Sp00f General Coding Help 11 8,163 Apr-05-2017, 07:12 PM
    Thread: No option to input
Post: RE: No option to input

(Mar-17-2017, 09:45 PM)buran Wrote: why not keep it as simple as possible? There is no need for using class, or even a function ro complete this task. You already did it ore or less: name = input('W...
Sp00f General Coding Help 7 4,999 Mar-17-2017, 09:52 PM
    Thread: so that I may post
Post: RE: so that I may post

hello to you too
Sp00f Bar 3 3,739 Mar-17-2017, 09:41 PM
    Thread: No option to input
Post: RE: No option to input

(Mar-17-2017, 08:59 PM)buran Wrote: would you like to elaborate further on this assignment, e.g. what getAge and getName are expected to do. This looks like homework, so better say so and provide th...
Sp00f General Coding Help 7 4,999 Mar-17-2017, 09:15 PM
    Thread: No option to input
Post: RE: No option to input

can someone try and show me? here it is def main():   class player1:     stay = True     def __init__(self, name, age):         self.name = name         self.age = age     def getAge(self, age):   ...
Sp00f General Coding Help 7 4,999 Mar-17-2017, 08:54 PM
    Thread: No option to input
Post: No option to input

[Image: https://i.imgur.com/Sw4cJfq.png] Hello, I'm running this with no error. But it isn't giving an option to input. Can someone explain to me why it's not launching the text field? Thank you
Sp00f General Coding Help 7 4,999 Mar-17-2017, 08:37 PM
    Thread: so that I may post
Post: so that I may post

Saying hello, because I need help. I need 1 post before I can post a link
Sp00f Bar 3 3,739 Mar-17-2017, 08:35 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020