#voice-chat-text-0
1 messages · Page 615 of 1
i'm just a class 12 IP student
learning python and mysql
started py last year
yeah me too
but sometime i get stuck on basic questions ehhehe
yeah me also some questions
is it easy ?
and configure it
i mean github
hmm ok im gonna start learning that from today
o/
nice
where you are from?
India
cool
Bangalore
i am from bihar
hmm
actually now im not in india
ooo now where u stay
bahrain
ooo
middle east
do u like that place 😄
yeah its cool
noice
but i like india more
nice to hear buddy
same here bye
can someone guide me how to get started with ml i have basics almost completed in py
i wnt to get started
smacks @errant helm with a trout
Haha, I had to do things and now I'm just getting lunch out of the way while I'm down here
You were AFK, which I think is the first time I've seen you in the AFK voice channel
I've been interrupted a few times today
hi
@stray linden do you like the music?
Distillery
__asm{mov eax,ecx}
@whole bear
good podcast guys :D srry if it might bother you, i'm enjoying it
I also love the talks of gdude and of eivl
pep_number
!pep <pep_number>
Can also use: get_pep, p
Fetches information about a PEP and sends it to the channel.
!p milne mujh
!pep <pep_number>
Can also use: get_pep, p
Fetches information about a PEP and sends it to the channel.
my tech lead deepfake
ive been listening to playdate on loop for 5 hours please help me
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
name = input('your name is ? ')
print('hi ' +name)
print(f'Hello, {name}.')
@severe elm anything written in f string will convert into string
@somber heath yeah is it illegal in server?
😂
@somber heath have we met earlier?
@somber heath oh thanks 😂
@somber heath age = input('your birthday ? ')
print(2020 - int(age))
shouldn't you declare age being a integer when you ask for it and throw exception in a while loop to ask again
when the user didnt enter a int
yeah sure
my frist day on py dev
thnx for feedback fix now
age = input('your birthday (use your birth years) | ')
print('your age is | ' , 2020 - int(age))
print('first dev Awmir On Py')
@severe elm @somber heath
im afk for 5 min
age = input('What is your age? ')
try:
float(age)
break
except ValueError:
print('Please enter numeral value.')```
whats going on?
voice chats are a thing
Hello ncurses
Successfully rebooted into Windows, now to try Debian
@gentle flint which one?
ofc Windows takes hhfdgjnuddaergoonvded4895ytcvv7 years
voice chats are a thing
@gentle flint what one
General
o
We were discussing the problem in there
is your dad available?
no
srry
np
he's working
but can it run crysis
some_var = "default"
def __init__(self, health, mana):
self.health = health
self.mana = mana
def attack(self):
print("attack!")
def defend(self):
print("defend!")
class Character(Entity):
# def __init__(self, health, mana):
# super().__init__(health, mana)
def set_name(self):
self.name = input("What is your name?\n")
# print("Welcome, " + name + "!")
def check_attribute(self):
print(self.health)
print(self.name)
def character_Stats(self, char_class):
char_class = char_class.lower()
if char_class == "paladin":
self.health += 20
self.mana += 30
elif char_class == "warlock":
self.health -= 20
self.mana += 30
elif char_class == "rogue":
self.mana -= 40
def main():
main_character = Character(100,100)
main_character.set_name()
char_class = input("""Select Your Class\n1.Paladin\n2.Warlock\n3.Rogue""")
main_character.character_Stats("warlock")
main_character.check_attribute()
print(main_character.some_var)
if __name__ == "__main__":
main()
super is very super
supa
whats backround noise?
Zappey
ah he left
lmfao
an abstract class would be like your entity
you wouldn't actually use it directly but you can inherit from it
an abstract class would be like your entity
@unreal badger good idea
yea just giving an example of an abstract class
then u make derived classes to inherit from it
age = input ("What is your age: ")
print ("Hello + name + " You are + age + ")```
is ther anything wrong here?
age = input ("What is your age: ") print ("Hello + name + " You are + age + ")``` is ther anything wrong here?
@gleaming perch age should have str(age)
ok.
Krita
ye
Krita is an open source drawing, painting and animation application designed for illustrators, concept artists, comic book creators, animators, game artists, matte painters and more. Krita is used daily by artists all over the world from professionals, to students, to enthusia...
$9.99
910
dragold in 5 minutes when he realises that steam rips you off for every game you buy
@whole bear
hak
o_o
"Toilet Management Simulator" is a simulation game. You build your own business in the game. Your goal is to make lots of money. Story begins, meeting with a homeless man when you go to your work in the morning. You help him instead of excluding and you get more, as scenario c...
$4.99
even steam didn't think they could rip you off for much with that
Start your RC journey with RealFlight Trainer EditionLearn to fly with the #1 radio-control flight simulation brand in the world. RealFlight Trainer Edition is powered by the industry-leading RealPhysics™ engine, and designed by both full-scale and RC pilots. This unmatched re...
$39.99
The developers describe the content like this:
This game may contain content that is not suitable for all ages or that may be objectionable to view at work: Nudity or Sexual Content, General Adult Content
...
FSX here
is that linux
o
mhm
i haven't seen linux before O_O
my internet is bad
MATE on Debian 10, with the Arc-Dark theme
srry for the autoconnect
oh ok
oo
CYBER ATTACKTake control of an elite global team of hackers, intercepting communications between corporations, governments, and criminals all around the world. In this game, you can choose to protect humanity by exposing private messages between dangerous individuals or exploi...
$3.99
when a game is cheaper than a toilet sim, it's pretty bad
ye
what was that sound
btw hovercraft i think u should upgrade to 16gb ram
i have 16 gb or ram
In Warehouse Simulator you will be able to manage your own warehouse by receiving and delivering orders with your own forklift. Become an expert handling the forklift and use it to do different tasks with different types of pallets and loads. Do missions transporting goods to ...
$9.99
^
im getting 16 gb ram
im still savin for my new pc
its going to have intel i5
1tb hdd
I literally only paid €30 for this desktop
2 monitors
im from UK
I literally only paid €30 for this desktop
@gentle flint oof
im from south africa
After releasing "Rabbit Simulator", I accumulated some experience in making animal simulators. I decided to use these experiences and high-quality graphics to create a new animal simulator. In the end, I chose this cute fox Creatures, I know that many people like foxes but can...
$7.99
I literally only paid €30 for this desktop
@gentle flint is that pounds
This is a free 3D visualizer and simulator of the Dongfeng-41 (DF-41) road-mobile intercontinental ballistic missile. The DF-41 launcher itself is fully drive-able with mechanics to launch the nuclear warhead in-game. 这是东风41(DF-41)公路机动洲际弹道导弹的免费3D可视化工具和模拟器。 DF-41发射器本身可以由机械师完全驱动...
about 27 pounds
ohh
Project Chemistry is a chemistry simulation that allows you to observe and conduct reactions with elements and molecules, experience chemistry in 3D for the first time and learn in the process.You can choose to experience this simulation in either the sandbox mode or the quest...
$9.99
you're turning into a Google ad for badly-selling Steam games
how much is 30 euros into rands
594 south african rands
oof
thats damn cheap
ikr
my pc im getting is likee
it crashed literally
but getting new ram would literally cost almost twice the worth of the whole pc
so I ain't doing it
16000 = 808 euros
my pc is R16000
14 years of age
im 13
what would u say
then we would say
blog it
lol
.-.
that's illegal
yes it is
ik
depends
its just breaking discords ToS
in some regions, transgressing the ToS can be illegal
(terms of service)
and you can be prosecuted for it
bye
@whole bear is indian
oh whatever
._.
check in settings
oh leave him be
ermmm
im from south africa
spreek jy ook die taal?
i dont know afrikaans that good
rip
lol
xd
bruh what the hell is going on in this vc
:3
who here uses pycharm
i do
PyCharm Community Edition 2020.2
I use atom
studio code yayyy
i can get the ip of any website
ez
btw with the screen shot comes my real name
there
i use pycharm
ok then
have you already tried visiting the ip
no
you'll see the url basically is a referral to the IP
that's what nameservers are for
put the ip in your favourite web browser
Wot are they talking on vc
Oh
y'ain't gone yet
@thin shale https://automatetheboringstuff.com/
class myclass:
myvar = 1
you can now do
myclass.myvar
which will return 1
@versed sapphire coursera offers courses from great universities
name = input("Willkommen in unserer Welt, wie heißt du?: ")
print("Schön dich kennen zu lernen, " + name + "!")
#Alter als Ziffer
alter = int(input("Wie alt bist du denn?: ") )
#Alter als Stroke
alter2 = str(alter)
a = int(12)
b = int(18)
if alter < a:
c = str(a - alter)
print("Sorry " + name + ", wenn du " + alter2 + " Jahre alt bist, dann bist du zu jung um dieses Spiel spielen zu dürfen, komme in " + c + " Jahren wieder!")
sys.exit()
elif b >= alter >= a:
print("Dein Alter passt perfekt für dieses Spiel!")
else:
print(name + ", du bist zwar schon älter als alle anderen Spieler, du wirst aber trotzdem dein Spaß haben!")```
Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.
To do this, use the following method:
```python
print('Hello world!')
```
Note:
• These are backticks, not quotes. Backticks can usually be found on the tilde key.
• You can also use py as the language instead of python
• The language must be on the first line next to the backticks with no space between them
This will result in the following:
print('Hello world!')
Read this ^^
thx
Your welcome
you don't need to do,
a = int(12)
b = int(15)
because they are already integers
import sys
name = input("Willkommen in unserer Welt, wie heißt du?: ")
print("Schön dich kennen zu lernen, " + name + "!")
#Alter als Ziffer
alter = int(input("Wie alt bist du denn?: ") )
#Alter als Stroke
alter2 = str(alter)
a = int(12)
b = int(18)
if alter < a:
c = str(a - alter)
print("Sorry " + name + ", wenn du " + (a - alter2) + " Jahre alt bist, dann bist du zu jung um dieses Spiel spielen zu dürfen, komme in " + c + " Jahren wieder!")
sys.exit()
elif b >= alter >= a:
print("Dein Alter passt perfekt für dieses Spiel!")
else:
print(name + ", du bist zwar schon älter als alle anderen Spieler, du wirst aber trotzdem dein Spaß haben!")
import sys
name = input("Willkommen in unserer Welt, wie heißt du?: ")
print(f"Schön dich kennen zu lernen, {name}!")
#Alter als Ziffer
alter = int(input("Wie alt bist du denn?: ") )
#Alter als Stroke
alter2 = str(alter)
a = 12
b = 18
if alter < a:
c = str(a - alter)
print(f"Sorry {name}, wenn du {a - alter2} Jahre alt bist, dann bist du zu jung um dieses Spiel spielen zu dürfen, komme in {c} Jahren wieder!")
sys.exit()
elif b >= alter >= a:
print("Dein Alter passt perfekt für dieses Spiel!")
else:
print(f"{name} du bist zwar schon älter als alle anderen Spieler, du wirst aber trotzdem dein Spaß haben!")
#Alter als Stroke
alter2 = input("Wie alt bist du denn?: ")
#Alter als Ziffer
alter = int(alter2)
Right now you're doing
str -> int -> str
With my change it's just
str -> int
thx @finite hamlet
login = "false"
name = input("enter your name: ")
age = input("enter your age: ")
year = input("enter your school year: ")
username = name[0:3] + age
print ("your username is ", username)
password = input("enter a password: ")
file = open("info.txt","a")
file.write (username)
file.write ("/n")
file.write (password)
file.close()
if login == "false":
print ("-LOGIN-")
file = open("info.txt","a")
loginusername = input("enter your username: ")
loginpassword = input("enter your password: ")
if loginusername == file.read[0] and loginpassword == file.read[1]:
print("username and password are correct")
login = "true"
else:
print ("username or password are incorrect")
file.close()
Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.
To do this, use the following method:
```python
print('Hello world!')
```
Note:
• These are backticks, not quotes. Backticks can usually be found on the tilde key.
• You can also use py as the language instead of python
• The language must be on the first line next to the backticks with no space between them
This will result in the following:
print('Hello world!')
````python`
Read this ^
```
'''python
`login = "false"
name = input("enter your name: ")
age = input("enter your age: ")
year = input("enter your school year: ")
username = name[0:3] + age
print ("your username is ", username)
password = input("enter a password: ")
file = open("info.txt","a")
file.write (username)
file.write ("/n")
file.write (password)
file.close()
if login == "false":
print ("-LOGIN-")
file = open("info.txt","a")
loginusername = input("enter your username: ")
loginpassword = input("enter your password: ")
if loginusername == file.read[0] and loginpassword == file.read[1]:
print("username and password are correct")
login = "true"
else:
print ("username or password are incorrect")
file.close(`)
3 backticks
!codeblock
Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.
To do this, use the following method:
```python
print('Hello world!')
```
Note:
• These are backticks, not quotes. Backticks can usually be found on the tilde key.
• You can also use py as the language instead of python
• The language must be on the first line next to the backticks with no space between them
This will result in the following:
print('Hello world!')
Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.
To do this, use the following method:
```python
print('Hello world!')
```
Note:
• These are backticks, not quotes. Backticks can usually be found on the tilde key.
• You can also use py as the language instead of python
• The language must be on the first line next to the backticks with no space between them
This will result in the following:
print('Hello world!')
'''python
login = "false"
name = input("enter your name: ")
age = input("enter your age: ")
year = input("enter your school year: ")
username = name[0:3] + age
print ("your username is ", username)
password = input("enter a password: ")
file = open("info.txt","a")
file.write (username)
file.write ("/n")
file.write (password)
file.close()
if login == "false":
print ("-LOGIN-")
file = open("info.txt","a")
loginusername = input("enter your username: ")
loginpassword = input("enter your password: ")
if loginusername == file.read[0] and loginpassword == file.read[1]:
print("username and password are correct")
login = "true"
else:
print ("username or password are incorrect")
file.close()
'''
@sudden ermine this is not back tick
the one you used before but 3 times
backticks, not quotes
The backtick is usually to the left of 1 on your keyboard
`
login = "false"
name = input("enter your name: ")
age = input("enter your age: ")
year = input("enter your school year: ")
username = name[0:3] + age
print ("your username is ", username)
password = input("enter a password: ")
file = open("info.txt","a")
file.write (username)
file.write ("/n")
file.write (password)
file.close()
if login == "false":
print ("-LOGIN-")
file = open("info.txt","a")
loginusername = input("enter your username: ")
loginpassword = input("enter your password: ")
if loginusername == file.read[0] and loginpassword == file.read[1]:
print("username and password are correct")
login = "true"
else:
print ("username or password are incorrect")
file.close()
✅
Open the file in read mode
file = open("info.txt", "r")
For the second part only
@finite hamlet yes
i would also change the login var to a boolean
Traceback (most recent call last):
File "D:/finla/A Level Stuff/Pre Year 12/computing/quiz task/quiz.py", line 23, in <module>
if loginusername == file.read[0] and loginpassword == file.read[1]:
TypeError: 'builtin_function_or_method' object is not subscriptable
@sudden ermine 1 back tick
like Traceback (most recent call last): File "D:/finla/A Level Stuff/Pre Year 12/computing/quiz task/quiz.py", line 23, in <module> if loginusername == file.read[0] and loginpassword == file.read[1]: TypeError: 'builtin_function_or_method' object is not subscriptable
and then 3 back ticks
Traceback (most recent call last):
File "D:/finla/A Level Stuff/Pre Year 12/computing/quiz task/quiz.py", line 23, in <module>
if loginusername == file.read[0] and loginpassword == file.read[1]:
TypeError: 'builtin_function_or_method' object is not subscriptable```
Much better
file.read should be a function call
f.readline(33)
login = "false"
name = input("enter your name: ")
age = input("enter your age: ")
year = input("enter your school year: ")
username = name[0:3] + age
print ("your username is ", username)
password = input("enter a password: ")
file = open("info.txt","a")
file.write (username)
file.write ("/n")
file.write (password)
file.close()
if login == "false":
print ("-LOGIN-")
file = open("info.txt","a")
loginusername = input("enter your username: ")
loginpassword = input("enter your password: ")
file_handle = open(filename,'r')
all_lines = file_handle.readlines()
if loginusername == all_lines[0] and loginpassword == all_lines[1]:
print("username and password are correct")
login = "true"
else:
print ("username or password are incorrect")
file.close()
enter your name: finlay
enter your age: 16
enter your school year: 12
your username is fin16
enter a password: 1234
-LOGIN-
enter your username: fin16
enter your password: 1234
Traceback (most recent call last):
File "D:/finla/A Level Stuff/Pre Year 12/computing/quiz task/quiz.py", line 23, in <module>
if loginusername == file.readline[0] and loginpassword == file.readline[1]:
TypeError: 'builtin_function_or_method' object is not subscriptable
Could you please use back tick ??
FILENAME = "info.txt"
login = "false"
name = input("enter your name: ")
age = input("enter your age: ")
year = input("enter your school year: ")
username = name[0:3] + age
print ("your username is ", username)
password = input("enter a password: ")
file = open(FILENAME, "a")
file.write (username)
file.write ("/n")
file.write (password)
file.close()
if login == "false":
print ("-LOGIN-")
file = open(FILENAME, "a")
loginusername = input("enter your username: ")
loginpassword = input("enter your password: ")
file_handle = open(FILENAME,'r')
all_lines = file_handle.readlines()
if loginusername == all_lines[0] and loginpassword == all_lines[1]:
print("username and password are correct")
login = "true"
else:
print ("username or password are incorrect")
file.close()
@wind star
malaysia
lol
bye
sorry gotta go on deafen again for 2 secs
lol
not sure which it is
grasias
de nada, señor
thats the most people i've ever seen xD
"No Route"
rip
fucking wonderful
@gentle flint will we get muted/banned/warned if we swear
!rules
The rules and guidelines that apply to this community can be found on our rules page. We expect all members of the community to have read and understood these.
doesn't look like it
mhm
why?
ok
nvm
should i make my taskbar white or keep it black
coz for some reason lots of other people use wite
@gentle flint is it showing now?
playing visual studio code
what're yall upto
which exam>
which subject @gleaming perch
afrikaaaaans
it is the most shittiest subject ever
if u were me
lol
i like it sometimes
but most of the time its boring
oks best of luck
@stone stream yeah
import tkinter as tk
from tkinter import ttk
win = tk.Tk()
win.title('Hogwarts Admission Form')
you never called ttk in the sample you posted here
Hey @whole bear!
Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:
• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)
• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:
hello
how can i send a big code
If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:
it literally says it
```It’s like this.```
Yeah, disord character limit is sad.
Makes sense though.
what just happened
@gentle flint and@versed sapphire y r u sending an year old whatsapp images
what??
bye
hey man''
good thing im going to eat kunch anyway
i cant speak sry
yo anyone wanna talk
public static boolean isEven(int number) {
return number % 2 == 0;
}
``` ```py
def isEven(num: int) -> bool:
return num % 2 == 0
``` ```js
function isEven(number) {
return number % 2 == 0;
}
isEven(+[]) // true
isEven(+!![]) // false
banana
print(letter)```
print(i)```
while condition_is_true:
print('To infinity and beyond! ctrl-c to break.')```
or while True:
That broke my pc
Apologies. Such was not intended.
nah it's fine
Noisy folk left.
?
For if that's why you left.
btn1 = tk.button(root, text="Search",command=lambda:showSubReds)
btn1.pack()
AttributeError: module 'tkinter' has no attribute 'button'
Python wrapper for the flightplandatabase.com API. Contribute to PH-KDX/flightplandb-python development by creating an account on GitHub.
It sounds like you're actually on a hovercraft @gentle flint
I cannot
It was an open goal
hi guys
This is one of those things that seems like it should be simple, but actually ends up being a bit complicated.
Oh right.
Could you do this:
f"{Fore.BLUE}{word}{Style.RESET_ALL}"
Fore.BLUE + word" ain't a thing too?
print("We live on a lake. Today {}" .format(person), "tested" + Style.RESET_ALL)
Have a look at my suggestion.
One sec
I'm a slow typer
print(f"We live on a lake. Today {Fore.BLUE}{person}{Style.RESET_ALL}")
Note the f before the string
Yeah, so these are called format-strings
they're the same as .format()
but a bit nicer to use.
Nice
No prob
👏 👏 👏
Erm, kind-of
Just use f-strings
I never use .format()
Anything in the {...} gets evaluated and converted to a string, then put into the string.
f"hello {x}"
is the same thing as
"hello {}".format(x)
Here's the documentation: https://docs.python.org/3/reference/lexical_analysis.html#f-strings
it's a bit technical, but gives examples
world = "world"
print("Hello" + world)
user_input = input("Whats your name")
print("hi" + user_input)
It's probably the same efficiency, but f-strings look nicer.
The official tutorial is pretty good btw.
automate the boring stuff is better
Bye
Go on...
So, you need to surround the text you want to color with those values
Fore.COLOR and Style.RESET_ALL
Erm, idk, I've never used this library before
But if you mean the f-strings, then yeah
print(f{Fore.RED}"We live on a lake. Today{Style.RESET_ALL} {Fore.BLUE}{person}{Style.RESET_ALL} tested")
Ok, the first part needs to be inside the f-string
But other than that, it looks ok
print(f"{Fore.RED}We live on a lake. Today{Style.RESET_ALL} {Fore.BLUE}{person}{Style.RESET_ALL} tested")
Yep
The {} contain an expression
The expression is evaluated
Then converted into a string
Then pasted into the f-string
Got there before me
Hmmm
I'm not a Windows guy sorry
I assume so
Basically, the Fore.RED is just an escape sequence that the terminal interprets as 'make everything from this point onwards red'
Yeah
Yep
You could even use a multi-line string to simplify it more
Yep
like this
print(f"""Line 1
Line 2
Line 3.""")
Yep
Yeah, the newlines will be in the string.
'\n' is the newline character
So you could also do print("line 1\nline 2\nline 3")
But that's not as readable
Yeah, whatever is between those quote marks is the string as you see it.
You still need the f at the front to make it an f-string.
copy and paste it here
The original code
actually nvm
Probably better if you do it.
It's pretty popular
text editor?
Personally, I use Vim.
But that's a different story.
You can boot linux from a USB stick I think.
so anyway...
hellooooooooo
Yeah everyone's muted 😆
I'm just self-conscious about my voice
You could do that
save a few characters of typing
Ok...
Right ok
The printed text?
Hmm, it depends where you create the f-string.
Ok, then it should work.
You are not allowed to use that command here. Please use the #bot-commands channel instead.
person = input("Type a name")Sam
print(f"Your name is {person"}
person = input("Type a new name")Greg
print(f"Your new name is{person}"
Yep
If you want to load the mad-lib from a file, you might need to go back to .format() funnily enough
It just occurred to me.
Yeah
Right right
Right ok
I think I remember there being a text-based space-simulator game
Like a moon-landing simulator
That you control with text
I love the idea of a text-based game with a really rich back-end.
Like it's this complicated simulation, but you only see text.
person = input(Fore.BLUE + "Type the name of a Person: " + Style.RESET_ALL)
exclamation_one = input("Type an Exclamation statment: ")
verb_one = input("Type a verb: ")
verb_two = input("Type another Verb: ")
place_one =input("Type the name of a Place: ")
place_two = input("Type another Place: ")
noun_one = input("Type a Noun: ")
verb_three = input("Type antother Verb: ")
noun_two = input("Type another Noun: ")
exclamation_two = input("Type another Exclamation statment ")
{verb,1}
words = input('').split()
{kick,punch,grab}
So if they enter a b c
You get the list words = ['a', 'b', 'c']
Then you can do words[i] to refer to the ith word, counting from zero
like words[0] would be 'a'
words[1] == 'b'
Yes, .split() splits on whitespace
!docs str.split
str.split(sep=None, maxsplit=-1)```
Return a list of the words in the string, using *sep* as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, the list will have at most `maxsplit+1` elements). If *maxsplit* is not specified or `-1`, then there is no limit on the number of splits (all possible splits are made).
If *sep* is given, consecutive delimiters are not grouped together and are deemed to delimit empty strings (for example, `'1,,2'.split(',')` returns `['1', '', '2']`). The *sep* argument may consist of multiple characters (for example, `'1<>2<>3'.split('<>')` returns `['1', '2', '3']`). Splitting an empty string with a specified separator returns `['']`.
For example:... [read more](https://docs.python.org/3/library/stdtypes.html#str.split)
verb = input("Type in three verbs: ").split()
yeah
you could replace commas with whitespace beforehand
to anticipate with this situation
input().replace(',', ' ').split()
verb = input("Type in three verbs: ").split(maxsplit+3)
Almost
verb = input("Type in three verbs: ").split(maxsplit=3)
typo
+ instead of =
hmm, actually
if you do maxsplit=3
anything after the second (third?) split will be combined
I think
Yeah, so
'a b c d'.split(maxsplit=2) returns ['a', 'b', 'c d']
It might be better to not use the maxsplit argument, then just ignore everything after the third element
Or you could explicitly throw it away like this:
mylist = mylist[:3]
That keeps the first three elements.
You mean...
verb = input("Type in three verbs: ").split()[:3]
All in one line?
verb = input("Type three verbs: ").split()
verb = verb[:3]
yep, that would work
But, on one line would also work.
yep
Have you learned about string slicing yet?
Ah right
You're learning from videos?
Should be
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
⭐️ Contents ⭐
⌨️ (0:00) Introduction
⌨️ (1:45) Installing Python & PyCharm
⌨️ (6:40) Setup & Hello World
⌨️ (10:23...
Ah
Ok
Or you can type it in one of the available help channels @tawny obsidian
a=int(input("Enter the 1st number"))
b=int(input("Enter the 2nd number"))
print("MENU")
print("1. Addition")
print("2. Subtraction")
print("3. Multiplication")
print("4. Division")
print("Select any one operation from the menu and enter the corresponding number bellow")
x=int(input("Choice"))
print("RESULT:-")
if(x==1):
print("Addition of two number="),a+b
if(x==2):
print("Subtraction of two number="),a-b
if(x==3):
print("Product of two number="),a*b
if(x==4):
print("Division of two number="),a/b
Should be print("Addition of two number=", a+b)
The a+b needs to be inside the print
No prob
thank u @stuck furnace
Anyway, @whole bear that looks alright
Those videos I mean
If they can get you through the basics in 4-hours, you might aswell binge watch that.
Cool
It's mostly important to have a structured learning environment
Yeah sure, go ahead
Yeah, maybe sensitivity is a bit low.
I'm using PTT
Ah right
We live on a lake. Today ['Sloane'] tested
hmm, the brackets denote a list
Maybe you haven't got to that part of the tutorial
a list containing one string, in this case
yo i just cant connect to internet in my app.. can anyone help?
import colorama
from colorama import Fore, Style
bl = Fore.BLACK
b = Fore.BLUE
r = Fore.RED
y = Fore.YELLOW
g = Fore.GREEN
rs = Style.RESET_ALL
person = input(f"{b}Type the name :{rs}").split()[:1]
print(f"""{r}We live on a lake{rs}{bl}.{rs} {r}Today{rs} {b}{person[1]}{rs} {r}tested{rs}""")
Type the name :Sloane
Traceback (most recent call last):
File "c:/Users/NEVER/Documents/test/test.py", line 14, in <module>
print(f"""{r}We live on a lake{rs}{bl}.{rs} {r}Today{rs} {b}{person[1]}{rs} {r}tested{rs}""")
IndexError: list index out of range
PS C:\Users\NEVER\Documents\test>
Ok, I see
The first element of a list is 0
Yeah exactly
Think of it as denoting the number of elements before (but not including) that element.
You could replace {rs}{bl} with {bl}.
Well, you do, but if you're setting a different foreground color immediately after there's no need to reset the foreground color.
You could do input(f'{bl}') I think
If you set the color, at the end of the input prompt, that should color the code entered by the user I think.
Yep
Nice
Alright, cya and good luck
No prob
hi
yo
whats going on
Not much, it's morning here
Yeah same
wher u live
wtff
wtf
Erm, @native terrace something wrong with your mic?
@native terrace wtf
Alright
echo
lo
wtf
dude
imaooo
get a new mic
OW
or use your phone
OUCH
FUCK
throw your computer
Guys, right click and select mute
done
I generally 'assume good faith'
you cannot be wearing headphones
Hmm, just make sure it's got all the essential info?
do it!
They have members around the globe!
*the platter
i hope no one believes earth is flat here
lol same
lol
I believe in 'doughnut earth' but only from playing Civilization too much
Python wrapper for the flightplandatabase.com API. Contribute to PH-KDX/flightplandb-python development by creating an account on GitHub.
my readme is too long
rip
Maybe add in some headings, break it up a bit.
Length doesn't matter if they can find the info they need quickly.
Also, write in an 'inverse triangle' style
?
what does my status say
Which I think is kind-of what you've already done
what say again
Some guy called Joe I think
I detest summer time
yes ofc
I am alive.
In science, the concept of a macroscope is the antithesis of the microscope, namely a method, technique or system by which a very large object can be observed, for example the Earth and its contents, or conceptually, the Universe. Obviously, a single system or instrument does ...
Didn't a load of javascript apps break, because someone removed their code that like left-aligns text or something.
yes
i do java python and js
Someone linked that video earlier 
This course will give you a full introduction into all of the core concepts in python. Follow along with the videos and you'll be a python programmer in no time!
⭐️ Contents ⭐
⌨️ (0:00) Introduction
⌨️ (1:45) Installing Python & PyCharm
⌨️ (6:40) Setup & Hello World
⌨️ (10:23...
Isn't C# used for Unity programming?
2 years ago
C# is just microsoft java
And it was something stupidly trivial
Yeah, it was kind-of a childish response.
The issue with doing that is possible confusion for users.
I would assume kik would be the official package.
Richard Stallman
Yeah, that's sad.
he was a genius
He was actually crazy, like full-blown schizophrenia.
Have you seen the film 'A Beautiful Mind'?
temple 0S
About John Nash
I think it's kindof a gimmick
WT.Social is supposed to be an another alternative to twitter
And it's actually active.
talk about what? I didn't hear
Ohhh, right
Yeah, it turned out a lot of that was overblown
Yeah, but I gather it was completely unsubstantiated
I'm all for people being held accountable
But in this instance I'm not convinced he did anything wrong
And I think he's probably autistic
yes
which is in no way an excuse
I actually agree with you about random numbers.
'randomness' is about uncertain knowledge
ye
This is actually an area that I'm fairly knowledgable in.
randomness of weather
Probability is actually subjective
Demonstration:
I just flipped a coin; what is the probability that it's heads?
50%
But now if I tell you it is heads, what is the probability?
of what
of heads
100%
Yeah, exactly
The probability changes as you get more information.
The probability distribution is a summary of the information you have about the system.
o/
We all agree with you
some bad guy music
PyDis is quiet, that's weird
Yeah true
Technically not a bug, just a bad UI design

Hey
Still not on my computer haha
I do have a computer
I'm just.. Rarely using it
gtg goodbye ill be back soon tho
Cya
How what work?

Ah yeah
They are TODOs fucking everywhere haha
I admit, my code is very messy
Lol
I honestly don't know.
Trump is running again for the new election I guess?
Ah yeah
I've made one class per infraction type, 'cause why not
I think pythontutor links here now.
I think I joined this server for a school project, just typed python in the join box
Time to eat, cya o/
cya
Get started with what?
wut
Head down to the games channel
well, this is exciting
The great migration
followed by the great remigration