PDA

View Full Version : python is annoying



EnderDas
03-19-2016, 12:00 AM
I've never used python before but if anyone uses it here's a console program don't judge i was bored and i am trying to learn python but its diffrent on each version :scratch:

WARNING THIS IS PYTHON 3.5.1 NOT HTML


hi = ("Jenny >>> Hello!")
>>> hello = ("Jenny >>> Hello!")
>>> hellow = ("Jenny >>> Hello!")
>>> hia = ("Jenny >>> Hello!")
>>> wassup = ("Jenny >>> Hello!")
>>> wasssup = ("Jenny >>> Hello!")
>>> wassssup = ("Jenny >>> Hello!")
>>> hey_there = ("Jenny >>> Hello!")
>>> hey = ("Jenny >>> Hello!")
>>> so_how_are_you = ("Jenny >>> Im great! How about you?")
>>> how_are_you = ("Jenny >>> Im great! How about you?")
>>> how_ya_doin = ("Jenny >>> Im great! How about you?")
>>> how_are_you_doing = ("Jenny >>> Im great How about you?")
>>> so_whats_up = ("Jenny >>> Nothing much...")
>>> so_wassup = ("Jenny >>> Nothing much...")
>>> nm = ("Jenny >>> Sounds fun?...")
>>> nm = ("Jenny >>> Sounds fun?...")
>>> im_good = ("Jenny >>> Thats Great!")
>>> im_great = ("Jenny >>> Thats Great!")
>>> lets_do_some_math = ("Jenny >>> Sure. What do you have in mind?")
>>> setup_math = ("Setting up math sequences")
2 = ("Jenny >>> 2")
3 = ("Jenny >>> 3")
4 = ("Jenny >>> 4")
5 = ("Jenny >>> 5")
6 = ("Jenny >>> 6")
7 = ("Jenny >>> 7")
8 = ("Jenny >>> 8")
9 = ("Jenny >>> 9")
10 = ("Jenny >>> 10")
1+1 ("Jenny >>> 2")
1+2, 2+1, 0+3, 3+0 = ("Jenny >>> 3")
1+3, 3+1, 2+2, 4+0, 0+4 = ("Jenny >>> 4")

("Jenny >>>")

useruser = ("<-!-Jenny Active-!->")
user = list('01010001001000111101111001010100101011111111 00101010101101001100001111100100100101111011010011 00010101100101010110000010101101100010100010111111 01001101001011011011010100101010111111001010101111 010110101010101101')
print("enter user twice then useruser once")
input("user>>> ")
BTW sence i know a majorty of python i can maybe make a farming calculator for anyone if they need it ;)

|ThyLuigi|
03-19-2016, 12:02 AM
I don't know what you're trying to accomplish, but that looks rather useless.

EnderDas
03-19-2016, 12:04 AM
I don't know what you're trying to accomplish, but that looks terribly inefficient.
like i said i was bored... i was trying to make like a bot that would talk back to you with certain responses but the input kept deleting itsself

|ThyLuigi|
03-19-2016, 12:10 AM
like i said i was bored... i was trying to make like a bot that would talk back to you with certain responses but the input kept deleting itsself
Ah, I see, that seems to just be a ton of if/else/if elses, or an AI.
example in ruby

def Hello
puts "Jenny: Hello!"
end
def Goodbye!
puts "Jenny: See ya!"
end
def Okay
puts "Jenny: Okay"
end
puts "Say something to jenny"
input = gets
if gets.downcase == "hello" || "hi" then Hello!
elsif gets.downcase == "bye" || "goodbye" || "cya" || "see ya" then Goodbye!
else Okay
end

EnderDas
03-19-2016, 12:30 AM
Ah, I see, that seems to just be a ton of if/else/if elses, or an AI.
example in ruby

def Hello
puts "Jenny: Hello!"
end
def Goodbye!
puts "Jenny: See ya!"
end
def Okay
puts "Jenny: Okay"
end
puts "Say something to jenny"
input = gets
if gets.downcase == "hello" || "hi" then Hello!
elsif gets.downcase == "bye" || "goodbye" || "cya" || "see ya" then Goodbye!
else Okay
end

the only problem though is i dont know how to make it so that it sees past spellng errors such as helo or hillo or helow or even hallp

- - - Updated - - -


Ah, I see, that seems to just be a ton of if/else/if elses, or an AI.
example in ruby

def Hello
puts "Jenny: Hello!"
end
def Goodbye!
puts "Jenny: See ya!"
end
def Okay
puts "Jenny: Okay"
end
puts "Say something to jenny"
input = gets
if gets.downcase == "hello" || "hi" then Hello!
elsif gets.downcase == "bye" || "goodbye" || "cya" || "see ya" then Goodbye!
else Okay
end

besides im using python so its much more annoying

- - - Updated - - -


Ah, I see, that seems to just be a ton of if/else/if elses, or an AI.
example in ruby

def Hello
puts "Jenny: Hello!"
end
def Goodbye!
puts "Jenny: See ya!"
end
def Okay
puts "Jenny: Okay"
end
puts "Say something to jenny"
input = gets
if gets.downcase == "hello" || "hi" then Hello!
elsif gets.downcase == "bye" || "goodbye" || "cya" || "see ya" then Goodbye!
else Okay
end

also idk i mean i want to learn a new language but i dont know what know python is supposed to be easy but is ruby easy at all?

|ThyLuigi|
03-19-2016, 01:15 AM
the only problem though is i dont know how to make it so that it sees past spellng errors such as helo or hillo or helow or even hallp

- - - Updated - - -


besides im using python so its much more annoying

- - - Updated - - -


also idk i mean i want to learn a new language but i dont know what know python is supposed to be easy but is ruby easy at all?

lemme answer all of these...

1.) You'd just have to either work around all of those, or do some checking for characters that include letters frequent in the word 'Hello', and other words as well.

2.) Python isn't that much harder than Ruby, it's still a dynamic scripting language making it ludicrously easy compared to other languages, and they're both C in the backend, so operators like &&, ||, !, and whatever are probably something they both have in common. 'Course, off of my own experience, it's a learning curve to learn any programming for the first time.

3.) Ruby is easy, but as is Python, I'd recommend learning most of the language and getting as much as you can out of it. I'm still doing a lot with ruby just so I can learn about it.

Conan
03-19-2016, 05:09 AM
@luigi
not really much of a learning curve if the syntaxes are the same ;)
ex
C-like proglangs

|ThyLuigi|
03-19-2016, 05:14 AM
@luigi
not really much of a learning curve if the syntaxes are the same ;)
ex
C-like proglangs
I meant learning your first programming language for the first time. I do agree when the syntaxes are all similar — I'm have a joy ride learning C right now, all the syntax is pretty familiar. :]