#voice-chat-text-0

1 messages ยท Page 770 of 1

wise cargoBOT
#

@boreal spear :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 6, in <module>
003 | NameError: name 'allowed' is not defined
somber heath
#

!e python def gen(): yield None g = gen() if g: print('Hello, world.')

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

Hello, world.
swift valley
#

Hm?

gentle flint
#
name = "Gre12g"

if any(letter.isdigit() for letter in name):
    print("Illegal characters found")
else:
    print("no illegal characters found")

is far easier if the only constraint is numbers

swift valley
#

The set(name) - allowed has something to do with the "truthiness" of sets

lusty marsh
#
i = 0

while True:
  if i == 0O7:
    break
  else:
    print(i)
  i += 1
noble copper
#

!e

name = "regular"
num = "dasda5sdsa"
sym = "poiuy$fsd"

print(any(not i.isalpha() for i in name))
print(any(not i.isalpha() for i in num))
print(any(not i.isalpha() for i in sym))
wise cargoBOT
#

@noble copper :white_check_mark: Your eval job has completed with return code 0.

001 | False
002 | True
003 | True
whole bear
#

the heck is this

#

oh

#

big brain

swift valley
#

When you remove all allowed characters from the user input, it can either return an empty or a non-empty set; in the case that it's non-empty e.g. there's no disallowed characters, the if won't ever run

gentle flint
#

but honestly, if you only want to check if it only contains letters (which I suspect is what you want) the easiest thing to do is

name = "Gre12g"

if name.isalpha():
    print("No illegal characters found")
else:
    print("Illegal characters found")
#

then you don't need to do all this complex stuff

hoary inlet
#

how do people remember/know all these methods ?

gentle flint
#

I googled the precise name of the function, 'cuz I'd forgotten it

whole bear
#

they dont

#

coding

gentle flint
#

but I just remembered there was a function to do that so all I had to google was the name

#

Maxima () is a computer algebra system (CAS) based on a 1982 version of Macsyma. It is written in Common Lisp and runs on all POSIX platforms such as macOS, Unix, BSD, and Linux, as well as under Microsoft Windows and Android. It is free software released under the terms of the GNU General Public License (GPL).

swift valley
#

Ergh

In [25]: class FilterService:
    ...:     """
    ...:     Utility class for filtering strings.
    ...:     """
    ...:     def __init__(self, *filters):
    ...:         self.filters = list(filters)
    ...:
    ...:     def add_filter(self, filt):
    ...:         self.filters.append(filt)
    ...:
    ...:     def __call__(self, content):
    ...:         return all(any(filt(letter) for letter in content) for filt in self.filters)
    ...:

In [26]: f = FilterService(str.isalpha, str.isdigit, lambda x: x == "#")

In [27]: f("Python#3000")
Out[27]: True
somber heath
#

!e python a,b,c = list(), set(), tuple() d,e,f = ['d'], {'e'}, ('f',) for each in (a,b,c,d,e,f): if each: print('Yep', end='') else: print('Nope. ', end='')

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

Nope. Nope. Nope. YepYepYep
somber heath
#

Pft. Missed a space. Same thing with str as with the other containers, too.

gentle flint
hoary inlet
gentle flint
#

yeah

#

get a general idea

#

so you can expect that something will work

#

for instance, now he knows there's a method to do this for letters he can assume there's one to do it for integers

#

then he can google that "check if string contains only digits python" and he'll find isdigit()

somber heath
#
finger.isdigit()```
gentle flint
#
>>> type(finger) == emoji
True
boreal spear
#

!e

name = 'Gre12g'
Found = False
for letter in name:
    if letter.isdigit():
        print("Illegal characters found")
        Found = True
        break
if not Found:
    print("no illegal characters found")
wise cargoBOT
#

@boreal spear :white_check_mark: Your eval job has completed with return code 0.

Illegal characters found
hoary inlet
#

how long does it take for people to pickup a new language ?

flint hill
#

depends

#

on everthing

lusty marsh
#

~1 month

#

if you're a beginner then 2-3 months

#

circa

uncut meteor
#

!e

name = 'Gre12g'
print(name.isalpha())
wise cargoBOT
#

@uncut meteor :white_check_mark: Your eval job has completed with return code 0.

False
uncut meteor
#

^ does the same

swift valley
#

The set solution could also be extended by just adding another set of allowed characters

lusty marsh
#

!e

print("GEGEGEGE_____".isalpha())
wise cargoBOT
#

@lusty marsh :white_check_mark: Your eval job has completed with return code 0.

False
swift valley
#

Also probably a microoptimization but it'd probably fare well with larger strings

uncut meteor
#

!e


name = 'Gre12g'
print(all(char in range(10) for char in name))
wise cargoBOT
#

@uncut meteor :white_check_mark: Your eval job has completed with return code 0.

False
swift valley
#

!e

from string import ascii_letters, punctuation

name = "Hello, World"
allowed = set(ascii_letters).intersection(set(punctuation))

if set(name) - allowed:
  print("Illegal characters found")
uncut meteor
#

there is so many ways to do it

#

its cool

wise cargoBOT
#

@swift valley :white_check_mark: Your eval job has completed with return code 0.

Illegal characters found
uncut meteor
#

one of my fav things about coding

#

means, I can be wrong in my own special way

#

c:

runic forum
#

that's why this is by far the best programming server, period

uncut meteor
#
while not (user_input:=input("Enter a number")).isdigit():
  print("Please enter a number!")

print(f"You entered: {user_input}")
dapper python
#

does anyone know lua coding in this

#

chat

uncut meteor
#

kinda

#

why?

dapper python
#

im having an issue troubleshooting something

#

i cant talk tho

#

lol

#

i think i need like 50 msgs in here? how can i see how many msgs i have

uncut meteor
#

!e

while bool(5):
  print("OP")
swift valley
#

You currently have 35 messages, one conversation should do it, although I'd advise against spamming it

dapper python
#

how can you see how many messages you have

wise cargoBOT
#

@uncut meteor :x: Your eval job timed out or ran out of memory.

001 | OP
002 | OP
003 | OP
004 | OP
005 | OP
006 | OP
007 | OP
008 | OP
009 | OP
010 | OP
011 | OP
... (truncated - too many lines)

Full output: too long to upload

boreal spear
#

!e

print(bool(5))
wise cargoBOT
#

@boreal spear :white_check_mark: Your eval job has completed with return code 0.

True
dapper python
#

@swift valley is there a command to track your message count

#

in this dc

#

i.e. !level

rugged root
swift valley
#

You can use the search feature

dapper python
#

ok

boreal spear
#

!e

print(bool(-5))
wise cargoBOT
#

@boreal spear :white_check_mark: Your eval job has completed with return code 0.

True
dapper python
#

well what i was gonna ask in vc has to do with lua coding so @uncut meteor if you understand it lmk

rugged root
#

Had to scoot down here. Chat was getting too loud for me to think

dapper python
#

and ill paste some of my code

boreal spear
#

!e

print(bool(0.1))
wise cargoBOT
#

@boreal spear :white_check_mark: Your eval job has completed with return code 0.

True
dapper python
#

but the lua dc im in is dead

swift valley
#

Empty lists are falsey

hoary inlet
#

I saw in some language, the default return was 0 and 1 for true and false, if you wanted true or false, you had to specify, at start, I guess it was c++

swift valley
#

Any empty container is really

dapper python
#

this is my code for reference

uncut meteor
#

!e


class Path:
  def __init__(self, base: str):
      self.path = base

  def __truediv__(self, other):
      if isinstance(other, str):
          self.path += "/" + other
      elif isinstance(other, Path):
          self.path += "/" + other.path


my_path = Path("Home")
my_path / Path("Test")
print(my_path.path)


new_path = Path("Home")
new_path / "Test"
print(new_path.path)
wise cargoBOT
#

@uncut meteor :white_check_mark: Your eval job has completed with return code 0.

001 | Home/Test
002 | Home/Test
rugged root
#

We're not helping with an aimbot

#

Period

dapper python
#

lol it has nothing to do with cheating

rugged root
#

Uh huh

dapper python
#

its more of learning how to read and write memory

#

i dont cheat online

rugged root
#

Then do it some other way

lusty marsh
#

new_path /= "..."

dapper python
#

wym

rugged root
#

Doesn't matter if you're doing it to learn about x thing. We're not assisting with an aimbot

dapper python
#

this is a coding server is it not? I'm not doing anything malicious

rugged root
#

There's plenty of other ways you can learn about reading and writing to memory

amber raptor
#

reading and writing to memory has little use outside cheating and netsec when it comes to Python

dapper python
#

my question doesnt even pertain to implementing cheats its just about syntax

rugged root
#

I didn't stutter

lusty marsh
#

!e

import random


def fire(alpha, bias):
    return random.randint(*(round(alpha - alpha * bias), round(alpha + alpha * (bias / 2))))


class Shell:
    def __init__(self, alpha):
        self.alpha = alpha


def clamp(val, low, high):
    val = low if val < low else val
    val = high if val > high else val

    return val


class Tank:
    def __init__(self, name, health):
        self.health = health
        self.name = name
        self.max_health = self.health
        self.arec = 25
        self.hit_chance = 99

    def hit(self, shell):
        if random.randint(0, 100-self.hit_chance) == 100-self.hit_chance:
            dmg = fire(shell.alpha, 0.15)

            ammo_rack = True if random.randint(0, 100 - self.arec) == 100 - self.arec else False
            dmg = self.health if ammo_rack else dmg

            dmg_correction = self.health - dmg
            dmg_correction = 0 if dmg_correction > 0 else -1 * dmg_correction

            self.health -= dmg
            self.health = clamp(self.health, 0, self.max_health)

            return f"{'๐Ÿ’ฅ ' if ammo_rack else ''}-{dmg - dmg_correction} {'๐Ÿ’ฅ' if ammo_rack else ''}"
        else:
            return f"{random.choice(['/_ Ricochet', '๐Ÿ›ก๏ธ Bounce'])}"


shell1 = Shell(750)
shell2 = Shell(490)
allied_tank = Tank("60TP", 2700)
enemy_tank = Tank("IS-7", 2700)
for i in range(10):

    msg = enemy_tank.hit(shell1)

    print(f"\n{msg}\n{enemy_tank.name}: {enemy_tank.health}")

    if enemy_tank.health <= 0:
        print(f"{allied_tank.name} -> {enemy_tank.name}")
        enemy_tank.health = enemy_tank.max_health
        allied_tank.health = allied_tank.max_health
        continue

    msg = allied_tank.hit(shell2)

    print(f"\n{msg}\n{allied_tank.name}: {allied_tank.health}")

    if allied_tank.health <= 0:
        print(f"{enemy_tank.name} -> {allied_tank.name}")
        enemy_tank.health = enemy_tank.max_health
        allied_tank.health = allied_tank.max_health

wise cargoBOT
#

@lusty marsh :white_check_mark: Your eval job has completed with return code 0.

001 | 
002 | ๐Ÿ›ก๏ธ Bounce
003 | IS-7: 2700
004 | 
005 | /_ Ricochet
006 | 60TP: 2700
007 | 
008 | -714 
009 | IS-7: 1986
010 | 
011 | ๐Ÿ›ก๏ธ Bounce
... (truncated - too many lines)

Full output: https://paste.pythondiscord.com/coduripoyi.txt

rugged root
#

!warn 214425768338391042 Renaming the functions is not going to help you. Consider this the last time I tell you. We will not assist with an aimbot.

wise cargoBOT
#

:incoming_envelope: :ok_hand: applied warning to @dapper python.

dapper python
#

lol

amber raptor
dapper python
#

okay

lusty marsh
#

i made the rolling logic

amber raptor
#

Missing too much "RNG LOLZ"

lusty marsh
#

yea, Bounce, Ricochet

amber raptor
#

Tracks eat shot

tall latch
#
The screen goes ON on the PC tonight
not a VScode to be seen
im in covid isolation
and it looks im in VIM
the time is going like a datetime.time
gotta close this thing
heaven know i tried```
amber raptor
#

Russian Bias

lusty marsh
#

i should add different hit like, miss, critical

lusty marsh
#

Rabbit whats your WTR

amber raptor
#

Recent 1500/53%

lusty marsh
#

Nice

amber raptor
#

Overall is higher before I started not giving a shit and just playing my overpowered Premiums like Progetto 46

dapper python
#

whats the best TA packages to use

#

other than talib

lusty marsh
#

Recent 3450/38.6%

dapper python
#

for data analysis

amber raptor
lusty marsh
#

I know its recent

dapper python
#

ta = technical analysis

lusty marsh
#

overall 48.6

dapper python
#

python

#

i have numpy and pandas was wondering if there was any others

#

specifically for stocks

#

or exchanges

dapper python
#

thats all i use python for

#

is TA

rugged root
lusty marsh
dapper python
#

yeah i use matplotlib to do chart plotting

#

uhh how do i pin a certain discord chat

#

theres so many in this discord i want to only have a select few to view

#

oh you can just do drop down arrows

#

@rugged root have you looked into solidity?

#

no its the ethereum coding language

#

nothing to do with python

hollow haven
#

Wheee slowly my team for my non-profit grows

flint hill
#

while not (Name1:=input("Enter Name of person")).isdigit():
print("Please enter a number!")

print(f"You entered: {Name1}")

uncut meteor
#

!code

wise cargoBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

flint hill
#

!e
while not (Name1:=input("Enter Name of person")).isdigit():
print("Please enter a number!")

print(f"You entered: {Name1}")

wise cargoBOT
#

@flint hill :x: Your eval job has completed with return code 1.

001 | Enter Name of personTraceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
uncut meteor
#
while not (name := input("Enter Name of person")).isalpha():
  print("Please enter a name!")

print(f"You entered: {name}")
hollow haven
#

Wasn't blockchain THE thing like 5 years ago?

uncut meteor
#

Whats a chain block

hollow haven
#

@rugged root RESPOND TO MY MESSAGE (just for the transaction)

dusk burrow
fair harbor
#

Why do you have the name : = ?

#

ok

#

Java > Python

#

Python gives too many airs

flint hill
#

!e
while not (Name1:= input("Enter Name of person")).isalpha():
print("Please enter a name! Only letters allowed")

print(f"You entered: { Name1 } ")

wise cargoBOT
#

@flint hill :x: Your eval job has completed with return code 1.

001 | Enter Name of personTraceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
lusty marsh
#

!e

while not (Name1 := input("Enter Name of person")).isalpha():
    print("Please enter a name! Only letters allowed")

print(f"You entered: {Name1} ")
wise cargoBOT
#

@lusty marsh :x: Your eval job has completed with return code 1.

001 | Enter Name of personTraceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
lusty marsh
#

The input causes it

fair harbor
#

!e
print("hello world")

wise cargoBOT
#

@fair harbor :white_check_mark: Your eval job has completed with return code 0.

hello world
terse needle
#

!docs KeyboardInterrupt

pine ledge
#

Hi

wise cargoBOT
#
exception KeyboardInterrupt```
Raised when the user hits the interrupt key (normally Control-C or Delete). During execution, a check for interrupts is made regularly. The exception inherits from [`BaseException`](#BaseException "BaseException") so as to not be accidentally caught by code that catches [`Exception`](#Exception "Exception") and thus prevent the interpreter from exiting.
terse needle
lusty marsh
#

!e

input()
wise cargoBOT
#

@lusty marsh :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | EOFError: EOF when reading a line
uncut meteor
#
def check(s: str) -> bool:
  return True

while not check(name := input("Input a name: ")):
  print("That is not a valid name")

print(f"You entered {name}")
terse needle
#

I would go about it like this

while True:
    Name1 = input("Enter Name of person")                 # Asks For Input

    if Name1.isalpha():                                   # Checks if Name1 has only unicode characters 
        break                                             # Breaks while loop

    print("Please enter a name! Only letters allowed")    # Prompts them to try again

print(f"You entered: {Name1} ")
fair harbor
#

another way

#

name = '0'
while name.isalpha() != True:
name = input("Please enter a name: ")
print("Your name is " + name)

terse needle
#

why are you checking != True

whole bear
#

isalpha() already returns a boolean

fair harbor
#

eh

uncut meteor
#

ur a boolean

whole bear
#

the expression after while keyword evaluates to either true or false

#

name.isalpha != True == !name.isalpha

fair harbor
#

just easier to read I guess

#

doesnt rly matter

whole bear
#

:thonk:

honest pier
#

it'd be not name.isalpha()

whole bear
#

uh

#

ohh

lusty marsh
#

Its not

whole bear
#

ty for correcting : )

terse needle
#

lol

whole bear
#

LMAO

#

Stop writing in pseudocode...

honest pier
#

wtf is a pointer

whole bear
#

malloc, calloc, realloc

fair harbor
#

only code in assembly

whole bear
#

ever heard of this :kek:

whole bear
fair harbor
#

There are 10 types of genders, male and female

whole bear
#

there are 11 genders, male, female and biscuit

uncut meteor
#

!docs str.isnumeric

wise cargoBOT
#
str.isnumeric()```
Return `True` if all characters in the string are numeric characters, and there is at least one character, `False` otherwise. Numeric characters include digit characters, and all characters that have the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those with the property value Numeric\_Type=Digit, Numeric\_Type=Decimal or Numeric\_Type=Numeric.
uncut meteor
#

!docs str.isalpha

wise cargoBOT
#
str.isalpha()```
Return `True` if all characters in the string are alphabetic and there is at least one character, `False` otherwise. Alphabetic characters are those characters defined in the Unicode character database as โ€œLetterโ€, i.e., those with general category property being one of โ€œLmโ€, โ€œLtโ€, โ€œLuโ€, โ€œLlโ€, or โ€œLoโ€. Note that this is different from the โ€œAlphabeticโ€ property defined in the Unicode Standard.
whole bear
#

int main() {
std::cout << "Hello world" << std::endl;
return 0;
}

uncut meteor
#
int main() {

    std::string test = "Hello World";

    std::cout << test;

}
terse needle
#
#include <cstdio>

int main(){
  printf("Hello World");
  return 0;
}
whole bear
#
#include <stdio>```
terse needle
#

cstdio

whole bear
#

is it?

terse needle
#

well if your using the c lib in cpp yeah

whole bear
#

in c, its just stdio.h

terse needle
#

stdio.h isnt it

whole bear
#

yeh

terse needle
#

yeah it is in c

whole bear
#

ye

#

i got a bit confused ;p

terse needle
#

we all do sometimes

#

found this today @whole bear an easy 4 kyu if you know itertools.permutation

whole bear
#

ok lemme check

#

oh ye lets try it >.<

uncut meteor
#

!docs itertools.permutations

wise cargoBOT
#
itertools.permutations(iterable, r=None)```
Return successive *r* length permutations of elements in the *iterable*.

If *r* is not specified or is `None`, then *r* defaults to the length of the *iterable* and all possible full-length permutations are generated.

The permutation tuples are emitted in lexicographic ordering according to the order of the input *iterable*. So, if the input *iterable* is sorted, the combination tuples will be produced in sorted order.

Elements are treated as unique based on their position, not on their value. So if the input elements are unique, there will be no repeat values in each permutation.

Roughly equivalent to:... [read more](https://docs.python.org/3/library/itertools.html#itertools.permutations)
whole bear
#

this doesnt looks ez

#

i mean it does

#

but it doesnt

uncut meteor
#

!e


string = "Example String"

print(all(char.isalpha() or char.isspace() for char in string))

temp_string = string.replace(" ", "")
print(temp_string.isalpha())
wise cargoBOT
#

@uncut meteor :white_check_mark: Your eval job has completed with return code 0.

001 | True
002 | True
terse needle
#

The KJ Method

while True:
    Name1 = input("Enter Name of person")                 # Asks For Input

    if Name1.replace(' ','').isalpha():                                   # Checks if Name1 has only unicode characters 
        break                                             # Breaks while loop

    print("Please enter a name! Only letters allowed")    # Prompts them to try again

print(f"You entered: {Name1} ")
#

!docs str.replace

wise cargoBOT
#
str.replace(old, new[, count])```
Return a copy of the string with all occurrences of substring *old* replaced by *new*. If the optional argument *count* is given, only the first *count* occurrences are replaced.
terse needle
#

!e

while True:
    Name1 = 'Jim Bob'                # Asks For Input

    if Name1.replace(' ','').isalpha():                                   # Checks if Name1 has only unicode characters 
        break                                             # Breaks while loop

    print("Please enter a name! Only letters allowed")    # Prompts them to try again

print(f"You entered: {Name1} ")
wise cargoBOT
#

@terse needle :white_check_mark: Your eval job has completed with return code 0.

You entered: Jim Bob 
terse needle
dusk burrow
whole bear
#

bruh, i hv already done this one

#

brb

hoary inlet
#

for looping ?

#

Alright, it's been fun. Have a good day โœŒ๏ธ โœŒ๏ธ

terse needle
#

!docs int

wise cargoBOT
#
class int([x])``````py
class int(x, base=10)```
Return an integer object constructed from a number or string *x*, or return `0` if no arguments are given. If *x* defines [`__int__()`](../reference/datamodel.html#object.__int__ "object.__int__"), `int(x)` returns `x.__int__()`. If *x* defines [`__index__()`](../reference/datamodel.html#object.__index__ "object.__index__"), it returns `x.__index__()`. If *x* defines [`__trunc__()`](../reference/datamodel.html#object.__trunc__ "object.__trunc__"), it returns `x.__trunc__()`. For floating point numbers, this truncates towards zero.... [read more](https://docs.python.org/3/library/functions.html#int)
uncut meteor
#

wats an int?

#

int-er-ger

#

!docs complex

wise cargoBOT
#
class complex([real[, imag]])```
Return a complex number with the value *real* + *imag**1j or convert a string or number to a complex number. If the first parameter is a string, it will be interpreted as a complex number and the function must be called without a second parameter. The second parameter can never be a string. Each argument may be any numeric type (including complex). If *imag* is omitted, it defaults to zero and the constructor serves as a numeric conversion like [`int`](#int "int") and [`float`](#float "float"). If both arguments are omitted, returns `0j`.

For a general Python object `x`, `complex(x)` delegates to `x.__complex__()`. If `__complex__()` is not defined then it falls back to [`__float__()`](../reference/datamodel.html#object.__float__ "object.__float__"). If `__float__()` is not defined then it falls back to [`__index__()`](../reference/datamodel.html#object.__index__ "object.__index__").

Note... [read more](https://docs.python.org/3/library/functions.html#complex)
uncut meteor
#

!e

print(1j * 5)
wise cargoBOT
#

@uncut meteor :white_check_mark: Your eval job has completed with return code 0.

5j
uncut meteor
#

!e
print(dir(5j))

wise cargoBOT
#

@uncut meteor :white_check_mark: Your eval job has completed with return code 0.

['__abs__', '__add__', '__bool__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__int__', '__le__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__pos__', '__pow__', '__radd__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rmod__', '__rmul__', '__rpow__', '__rsub__', '__rtruediv__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', 'conjugate', 'imag', 'real']
terse needle
#

!docs int

wise cargoBOT
#
class int([x])``````py
class int(x, base=10)```
Return an integer object constructed from a number or string *x*, or return `0` if no arguments are given. If *x* defines [`__int__()`](../reference/datamodel.html#object.__int__ "object.__int__"), `int(x)` returns `x.__int__()`. If *x* defines [`__index__()`](../reference/datamodel.html#object.__index__ "object.__index__"), it returns `x.__index__()`. If *x* defines [`__trunc__()`](../reference/datamodel.html#object.__trunc__ "object.__trunc__"), it returns `x.__trunc__()`. For floating point numbers, this truncates towards zero.... [read more](https://docs.python.org/3/library/functions.html#int)
terse needle
#

!e

my_complex = 10j + 5
print(f'Real {my_complex.real}')
print(f'Imag. {my_complex.imag}')
wise cargoBOT
#

@terse needle :white_check_mark: Your eval job has completed with return code 0.

001 | Real 0.0
002 | Imag. 50.0
uncut meteor
#

how can that be used?

#

or

#

where

rugged root
#

!code

wise cargoBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

whole bear
#
hello
#
print('HELLO')
terse needle
#

!e

my_complex = 10j + 5
print(f'Conjugation {my_complex.conjugate()}')
print(f'Real {my_complex.real}')
print(f'Imag. {my_complex.imag}')
wise cargoBOT
#

@terse needle :white_check_mark: Your eval job has completed with return code 0.

001 | Conjugation (5-10j)
002 | Real 5.0
003 | Imag. 10.0
terse needle
# uncut meteor how can that be used?

from what i've read in the docs and other stuff, they are only used in maths equations etc as they can then be treated like any other number type once in the complex type

uncut meteor
#

!e
int("adeifjhs")

#

!e


user_number = None
# Keep asking for input until it is a number.
while user_number is None:
  user_input = input("Enter a number: ")
  try:
    user_number = int(user_input)
  except ValueError:
    continue
honest pier
#

wouldn't that loop 1 time only ?

wise cargoBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code
block. Code can be re-evaluated by editing the original message within 10 seconds and
clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an
issue with it!*

#

Hey @flint hill!

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:

https://paste.pythondiscord.com

vivid palm
#

hi

flint hill
#

enter the name of the person....:bob
You entered: bob
enter the number of violations.....:25
f"You entered: 25
Enter the persons age.....:2
f"You entered: 2
Traceback (most recent call last):
File "C:/Users/Owner/AppData/Local/Programs/Python/Python38-32/work sshuff/extra fun.py", line 59, in <module>
if numv>=0:
TypeError: '>=' not supported between instances of 'str' and 'int'

vivid palm
#

is anyone good at recognizing car models?

honest pier
#

๐Ÿง

#

ohh..

vivid palm
#

does anyone recognize this make/model?

honest pier
#

the one on fire?

vivid palm
#

yes

terse needle
#

!pastebin

wise cargoBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

honest pier
#

!paste @flint hill

whole bear
#

Hi guys

terse needle
#

!e

x = '12' # This could be an input but for the sake of the evaluation we can not have inputs
y = int(x)
print(x, type(x))
print(y, type(y))
wise cargoBOT
#

@terse needle :white_check_mark: Your eval job has completed with return code 0.

001 | 12 <class 'str'>
002 | 12 <class 'int'>
whole bear
#

@dusk burrow Yeah, I have a good project

#

I'm making a cake

#

Yeah helping family otherwise I will get kicked of house.

#

@whole bear Wow, amazing. Your singing skills are mind-blowing.

#

No

#

I'm south african

#

No failed everything

#

@whole bear Are you studying for computer science?

#

No because I failed computer science.

#

naw not me

#

i am learning it but not going to school or anything

#

@whole bear Covid still going on Uk?

#

Not going to school. Just chilling with my cat.

gritty garden
#

@whole bear Good Evening

#

@gentle flint Hello Verbose

whole bear
#

@gritty garden good evening

golden hearth
#

hello :)

gritty garden
gentle flint
gritty garden
whole bear
#

good bro, u?

gritty garden
golden hearth
gritty garden
gritty garden
golden hearth
#

what are you guys talking about?

whole bear
#

I'm going to visit Uk next sep

gritty garden
whole bear
#

yes

#

Hi

gritty garden
gritty garden
whole bear
#

Doing great

gritty garden
#

๐Ÿ™‚

whole bear
#

๐Ÿ™‚

gritty garden
#

Lol

#

@dusk burrow How are you Salah ?

whole bear
#

Thanks.

#

@gritty garden im not sure man

gritty garden
#

@dusk burrow good thanks man

#

@dusk burrow are you going talking about machine learning ?

#

or what

gritty garden
whole bear
#

machine learning is amazing. I wish I could learn machine learning, but I can't because I realize I'm dumb.

gritty garden
#

like a lot of time

#

@whole bear I don't know machine learning

whole bear
#

Yeah, I'm ok with math. I'm lazy.

gritty garden
whole bear
#

my school did a great job of explaining math, but I didn't care about it much ๐Ÿ˜ฆ

#

All my fault

#

Even mazen is struggling to study geo

gritty garden
#

@whole bear are Airports still closed there

whole bear
#

@whole bear Back to college on 8 march.

gritty garden
#

@dusk burrow please don't hate me

#

Haha

#

I'm your neighbor

#

Lol

#

@gentle flint can we talk

gritty garden
#

๐Ÿค”

golden hearth
#

what are you guys talking about? thinkmon

gritty garden
golden hearth
#

so basically big brain stuff got it

#

lol

gritty garden
#

@gentle flint Casablanca ?

gritty garden
whole bear
#

@whole bear You don't need to go to college because everything is online for you I think.

golden hearth
#

idk what prequistes is

whole bear
#

Lucky guy

golden hearth
#

oof

whole bear
#

Wait really?

gritty garden
golden hearth
#

you type fast holy

gritty garden
#

for example, you need to learn math (algebra and trigonometry and geometry and calculus) before you start learning game development

gentle flint
golden hearth
#

well yeah

#

you can do it without maths

gritty garden
#

Lol

golden hearth
#

but itll take ages

whole bear
#

@whole bear Are you doing uni without gcse?

golden hearth
#

oh lol

gritty garden
golden hearth
#

yeah

gritty garden
#

maybe like a memory game

golden hearth
#

basic stuff with velocities

#

but like nothing advanced

gritty garden
#

If you want to make a game like Asteroid or Eve Online

errant apex
#

can I enter and listen?

golden hearth
#

_>

gritty garden
golden hearth
#

yo why are you so friendly and affable >_>

gritty garden
whole bear
#

I'm in Uk for the holidays ๐Ÿ™‚

golden hearth
gritty garden
golden hearth
whole bear
#

No.

golden hearth
#

how can you travel with corona

whole bear
#

@golden hearth I have been stuck ๐Ÿ˜ฆ

gritty garden
# golden hearth you

maybe because of Sunni Islam ?, I'm really worried to talk about Religion in this discord, the admins might ban me for that

golden hearth
#

oh shi-

#

you're stuck?

whole bear
#

Yes.

golden hearth
#

then why are you sad

#

xD

whole bear
#

Life is rolling in cheese that's why

gritty garden
#

Lol

errant apex
#

So what are you talking about?

golden hearth
#

SARS-COV-2

#

my bad

#

lol

#

i meant the beer

gritty garden
#

@whole bear you are in a python discord and talking about web development.....I'm smelling of something called....Flask....and Django

golden hearth
#

_>

whole bear
#

@dusk burrow I'm a security engineer for someone's company.

gritty garden
#

@whole bear data science....now I'm smelling something called Numpy and Pandas

#

Lol

whole bear
#

I know numpy

gritty garden
whole bear
#

Numpy has one of the best documentation god damn.

gritty garden
#

@dusk burrow what is the difference between Machine Learning and Deep Learning ?

gritty garden
#

@whole bear of course you can

#

please answer that

golden hearth
#

uhhhh

#

in machine learning

gritty garden
#

@whole bear I have a basic idea about them

whole bear
#

Why NumPy? Powerful n-dimensional arrays. Numerical computing tools. Interoperable. Performant. Open source.

golden hearth
#

the machine learns

#

deep learning

#

something deep in the ocean learns

gritty garden
#

@whole bear like you give multiple inputs and based on weights you get outputs ?

whole bear
#

deep learning is like deep web

golden hearth
#

_>

#

oof you guys are talking big brain stuff

#

my brain cell explode >_>

gritty garden
#

@whole bear some people using machine learning or deep learning to make a bot that plays all levels of super mario games

golden hearth
#

wanna talk about print statements?

gritty garden
#

@whole bear to make a bot that play games, is that machine learning or deep learning

#

like the super mario example

#

@whole bear Deep Learning

#

oh ok

whole bear
#

@whole bear They use it in antivirus software, right?

gritty garden
#

@whole bear Q-Learning you mean

golden hearth
#

bot detection too

whole bear
#

Mainly use it in supermarkets

golden hearth
#

i think

gritty garden
#

@whole bear I know Q-Learning is like based on rewarding system

gritty garden
golden hearth
#

how many pings is this dude gonna get >_>

#

calm down with the pings

gritty garden
#

sorry, PythoNub

golden hearth
#

all i see is MAZEN MAZEN

#

lol

#

dw

gritty garden
#

Lol

whole bear
#

lol

gritty garden
#

Hahahahahahaha

golden hearth
#

laughing via text

whole bear
#

Amazon is sleeping in deep learning.

gritty garden
golden hearth
#

nice

#

im glad

gritty garden
#

I use it for MMO servers

#

and you ?

#

@dusk burrow ุตู„ุงุญ ุงู„ุฏูŠู†

#

@gentle flint You know Arabic too

#

cool man

#

@dusk burrow ุฃูุถู„ ู…ู† ุงู„ูŠูˆู… ุงู„ุฐูŠ ุณุจู‚ู‡

#

@whole bear Chinese ?

errant apex
#

where you all from?

#

I'm portuguese (from Portugal)

gritty garden
#

@whole bear why there are 2 kinds of Chinese (Mandarin and Simplified) ?

whole bear
#

@dusk burrow But you don't hate life ๐Ÿ™‚

gritty garden
whole bear
#

Thanks

gentle flint
#

lol

whole bear
#

@gentle flint where you from?

#

oh

sharp violet
#

have i been in the serer long enough to talk in vc yet?

gentle flint
#

in Hebrew, "all of the day" is "kol hayom"
in Arabic it's "kullayom" from what I was hearing

whole bear
#

Oh

hoary dirge
gentle flint
#

why not?

hoary dirge
#

cause you are from Holland ๐Ÿ˜„

gentle flint
#

I find languages interesting

#

well, I speak English too

whole bear
#

@whole bear Near London, people who are rich live near London, right?

hoary dirge
whole bear
#

@whole bear depends where

#

@whole bear im like a 45min drive from London

gritty garden
whole bear
#

Oh ok

hoary dirge
whole bear
#

Nice ui.

gentle flint
#

thx

whole bear
gritty garden
golden hearth
#

In this video, I tell you the best IDE to use for programming. No matter what kind of programming you do.

๐Ÿ“š Video courses from JomaClass:
๐ŸŽ“ New to programming? Learn Python here: https://joma.tech/35gCJTd
๐ŸŽ“ Learn SQL for data science and data analytics: https://joma.tech/3nteQih
๐ŸŽ“ Data Structures and Algorithms: https://joma.tech/2W89H33

Music...

โ–ถ Play video
#

i like this dude

whole bear
#

Lol

golden hearth
#

ms word is best

gritty garden
#

Visual Studio Code

whole bear
#

Vscode is the best

#

my sir uses ms excel to code and i m not lying

gentle flint
golden hearth
#

MS WORD IS BEST

#

๐Ÿคฃ

whole bear
gritty garden
whole bear
#

Lol

golden hearth
#

yes

#

ms word is best

whole bear
#

my legendary sir

golden hearth
#

no wait i have a better one

#

WHATSAPP

gritty garden
whole bear
#

Excel used to store information

#

he actually uses ms excel gawd

gritty garden
golden hearth
#

i use pycharm >_>

#

not ms word

whole bear
#

Yeah

golden hearth
#

but imma send this to my frind

whole bear
#

pycharm is nice

golden hearth
#

and he will use ms word

gritty garden
whole bear
#

I do everything with python

golden hearth
#

O_O

#

everything?

gritty garden
golden hearth
#

who is typing right now

#

your program?

whole bear
#

starting from web development ending with discord bot

golden hearth
#

_>

gritty garden
#

or else

whole bear
#

main focus is cybersecurity

golden hearth
#

man im gonna get a new pc soon

#

but the gpu market is clapped

whole bear
#

But currently studying for ccna

whole bear
golden hearth
#

fricking gpu bitcoin miners

whole bear
#

Cisco Certified Network Associate

gentle flint
#

Chirpy Cheerful Nutty Alligator

golden hearth
#

yes i love python

gritty garden
#

and every year

golden hearth
#

lol

#

the yt recommendation algo is clapped

gritty garden
#

all that because I clicked on a cat video once

golden hearth
#

you call that messed up?

#

cats are fine

#

mine's filled with political stuff im not fricking intreested in

gritty garden
golden hearth
#

lol

#

i want this server to say ms word is the best ide in the resources page on april fools

#

you seem a lot frustrated about cats >_>

gritty garden
#

๐Ÿ˜

golden hearth
#

brUH

gritty garden
#

Not PHP

#

don't worry

whole bear
#

Lol

gritty garden
#

I know Everyone Hates PHP

whole bear
#

no

golden hearth
#

php?

whole bear
#

i lub php, jquery nd css

golden hearth
#

a programming thing?

whole bear
#

jquery is outdated I think.

whole bear
gentle flint
whole bear
#

@whole bear use bootstrap ๐Ÿ™‚

golden hearth
#

man i wish my mic wasnt broken

whole bear
#

use materialise

golden hearth
#

i split water over it

whole bear
#

I don't use bootstrap

#

oh

gritty garden
whole bear
#

I do css myself

gritty garden
whole bear
#

Yes same

#

And sass

#

atleast use sass

#

What

#

trash is world

gritty garden
whole bear
#

sass is trash when it's advanced version of css

#

I don't do web development main thing

whole bear
#

Squareroot

#

1.414

#

1.414

#

Keep singing

#

etc,etc

#

non-recurring non-terminating : irrational

#

my ears are bleading

whole bear
#

Please no

#

i can't suffer anymore.

#

there you go

#

@gritty garden Are you https?

gentle flint
#

etc

#

et cetera

whole bear
#

et-cet-ra

#

without you I'm just a ://

gentle flint
#

etsetra

whole bear
#

edge-cedge-ra

#

ur mouth is arabic, what about the rest of the body

#

Lol

#

๐Ÿ˜ณ.

#

It's loading forever

#

I have 100 tabs

gritty garden
#

@gentle flint Inner-net

whole bear
#

bye

golden hearth
#

intense breathing noises

whole bear
#

@gritty garden where r u from

golden hearth
#

bruh

whole bear
#

where r they from

gritty garden
golden hearth
#

ยฏ_(ใƒ„)_/ยฏ

#

idk

gritty garden
#

we speak Arabic

whole bear
#

oh

gritty garden
whole bear
#

nope

gritty garden
#

oh ok

golden hearth
#

ุถุฌูŠุฌ ุดุฏูŠุฏ ููŠ ุงู„ุชู†ูุณ

whole bear
#

i hav lived in arabic countries

golden hearth
#

i used googlr translate

#

_>

gritty garden
golden hearth
#

ุนู„ู‰ ุงู„ุฃู‚ู„ ู‚ู„ุช ุฃู†ู†ูŠ ุงุณุชุฎุฏู…ุชู‡

whole bear
#

UAE mainly

gritty garden
#

Laaaaame ๐Ÿ˜•

whole bear
#

๐Ÿง .

golden hearth
#

ู‡ุฐู‡ ุงู„ู„ุบุฉ ู…ูƒุชูˆุจุฉ ุจุทุฑูŠู‚ุฉ ุฑุงุฆุนุฉ ุŒ ู„ู† ุชูƒุฐุจ

whole bear
#

they skip all t's and r's

golden hearth
#

you guys are gonna love UK accent

#

wat'a

whole bear
#

i can make accents too

golden hearth
#

is water

gritty garden
golden hearth
#

yeah

#

how long do you guys plan on talking >_>

whole bear
#

1s

gritty garden
golden hearth
#

no no

#

im curious

#

_>

whole bear
#

i dont plan anything

golden hearth
#

lol

#

nvm

#

do you guys have experience with coding discord bots >_>in python

#

i might need some help

#

oof nvm

#

ill take that as a no

gritty garden
golden hearth
#

yeah

gritty garden
#

I use discord.js

#

for discord bots

golden hearth
#

im gonna make a bot soon for 5 hrs straight

gritty garden
#

I only use Python for MMO servers

golden hearth
#

MMO?

#

what is MMO?

gritty garden
#

Massive Multiplayer online

#

for games

golden hearth
#

oooh

#

i see

#

i dont have any experience in java

#

lol

dusk burrow
#

The Dissident

golden hearth
#

oh i just saw the logo changed >_>

gritty garden
golden hearth
#

yeah

gritty garden
#

It was horrible

golden hearth
#

O_O

#

IT WAS FOR BLACK HISTORY MONTH

#

DELETE YOUR MESSAGE

gritty garden
#

I'm not against black

golden hearth
#

ohh

#

srry

#

i thought you didnt know

gritty garden
#

I have a lot of black friends, color doesn't matter to me

uneven zenith
#

K

#

K

golden hearth
#

why are you saying K

gritty garden
golden hearth
#

_>

#

serious problem

#

gonna code the bot soon O_O

#

need to make a plan rq

gritty garden
golden hearth
#

yes

#

this gif is so cringe worthy

golden hearth
#

lol

whole bear
golden hearth
#

ye

gritty garden
whole bear
#

fixed that for you

golden hearth
#

holy shit the vc is exploding >_>

#

my audio is messed up

gritty garden
whole bear
#

same]

gentle flint
whole bear
#

i ll scream something too dw

golden hearth
#

this is fine

#

my internet speed is kinda slow

whole bear
#

my microphone is weirding out

#

wait for it :cruel_laughter:

golden hearth
#

it goes like 200 mbps but sometimes stays stuck at 60 Mbps

golden hearth
#

i heared my name

#

yes?

#

ofc

gritty garden
#

that would be cool man

#

no homo

golden hearth
#

lol

gritty garden
#

thats the wrong emoji btw

whole bear
#

who is homo ๐Ÿฉด

golden hearth
#

people dont say its cool to have a friend like me but okay

#

๐Ÿ˜‚

whole bear
#

?

golden hearth
#

๐Ÿ˜‚

whole bear
#

uh..

golden hearth
#

look at that gif

#

and you will know

#

who is homo

#

yes

whole bear
#

i want to be a trans 50%

golden hearth
#

what did i forget?

whole bear
#

jk

golden hearth
#

lololololol

gritty garden
#

@gentle flint Kerbal Space Program

golden hearth
#

i saw ksp 2

#

silence?

#

wow

#

thats rare

gritty garden
golden hearth
#

oh yeah i forgot srry

#

sent it

gritty garden
#

and you can delete too

golden hearth
#

yeah

#

oh wait

#

YEAH

#

ty

gritty garden
#

CRUD Operations

gritty garden
whole bear
gritty garden
#

ok

whole bear
#

that is a symbol of understanding things late

whole bear
#

its 11:43pm too here

golden hearth
#

gn :)

whole bear
#

not me

#

uh oh

#

who is joe?

#

idk who luis is

#

e

#

I need help to complete my program

#

def moyenne(nom):
if nom in Durand:
notes = resultats[nom]
total_points = {'Durant':[0]}
print(total_points)
total_coefficients = {'Durant':[1]}
for i in notes.values():
note, coefficient = valeurs
total_points = total_points + 2 *coefficient
total_coefficients = 2 +coefficient
return round(total_points/total_coefficeints ,1)
else:
return -1

resultats = {'Dupont':{'DS1':[15.5,4],'DM1':[14.5,1],'DS2':[13,4],'PROJET1':[16,3],'DS3':[14,4]}}, {'Durand':{'DS1':[6,4],'DM1':[14.5,1],'DS2':[8,4],'PROJET1':[9,3],'DS3':[8,4],'IE1':[7,2],'DS4':[15,4]}}

#

ok

#

the missing part must be filled in

#

I shipments with the holes

#

def moyenne(nom):
if nom in Durand:
notes = resultats[nom]
total_points = ........
total_coefficients = ........
for i in notes.values():
note, coefficient = valeurs
total_points = total_points + .... *coefficient
total_coefficients = ..... +coefficient
return round(....../total_coefficeints ,1)
else:
return -1

resultats = {'Dupont':{'DS1':[15.5,4],'DM1':[14.5,1],'DS2':[13,4],'PROJET1':[16,3],'DS3':[14,4]}}, {'Durand':{'DS1':[6,4],'DM1':[14.5,1],'DS2':[8,4],'PROJET1':[9,3],'DS3':[8,4],'IE1':[7,2],'DS4':[15,4]}}

#

you do not understand the need to redo everything just filled in the places with the pointiel

#

ok no problem

fast umbra
#

Hello

#

I have not yet been voice verified ๐Ÿ™‚

fair harbor
#

Me neither

#

I have also not been voice verified

#

Maybe one day

#

I can possibly be voice verified

#

-___-'

sinful bramble
#

@zealous wave u live streaming? ๐Ÿ˜ฎ

zealous wave
#

where?

sinful bramble
#

oh i thought youre live streaming in voice xD

zealous wave
#

just working one a part of a bot that I dont really want to do

#

@neat seal

neat seal
#

textbox=pyautogui.locateOnScreen('textbox.png') pyautogui.click(textbox)

zealous wave
#

!code

wise cargoBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

zealous wave
vivid palm
#

helloooooooooooooo

#

trying to get something done for work.. could use the company lol

paper tendon
flat sentinel
tall latch
#

now it looks like this

golden hearth
#

Gm people :)

#

oof i have online school

#

im gonna be back soon#

paper tendon
#

lol

#

see you later

#

I need to do some work

odd dragon
#

money=int(input())
ap =int(input())
pp =int(input())

for i in range(1,money):
for a in range(1,i):
ap *= a
for p in range(1,i):
pp *= p
if ap+pp == money:
print(a, p)

strong arch
#

!fmt

tall latch
#

tap + tpp == money

whole bear
#

@whole bear wassup

#

How is it going brother

#

Nice

#

Environment variable is good because it actually protects your data like makes it secret.

#

Yeah, but data is most important so it doesn't matter about ram.

#

Just move everything to cloud

#

settle life forever

#

you can use flash drive as ram

#

everything goes there and accessable

#

FUCK YEAH

#

Yeah

#

That's why, you have to learn mma

#

so you can protect drives from bad guys

#

๐Ÿ˜„

#

money making account

#

poor network connection

paper gale
#

why can't I talk in the voice chat?

#

alright thanks mate

flat sentinel
slate pier
#

why can't i speak in vc?

flat sentinel
#

you need to vc verify

#

there is a chat

slate pier
#
def slice_from(string, start, end):
    return
    string = input("Enter a string: ") 
    start = int(input("Enter a starting position: "))
    end = int(input("Enter an ending position: "))
    sliced_string = slice_from(string, start, end)```
gloomy vigil
#

use lamda

somber heath
#
'ABC'[0] == 'A'```
#

!e python a = 'ABC'[:2] print(a)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

AB
gloomy vigil
#
print(string[start-1:end-1])
somber heath
#

!e python a = 'ABC'[2:] print(a)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

C
somber heath
#

!e python a = 'ABCDEFG'[2:4] print(a)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

CD
gloomy vigil
#

yea

somber heath
#
subscriptable[start:stop:step]```
#
'ABC'[::-1] == 'CBA'```
terse needle
#

wow, didnt know there was a step

somber heath
#
'ABC'[-1] == 'C'
'ABC'[-2] == 'B'```
#

!e print('ABCDEFG'[::2])

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

ACEG
somber heath
#

!e print('ABCDEFG'[::-2])

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

GECA
somber heath
#
def slice_from(string, start, end):
    return
string = input("Enter a string: ") 
start = int(input("Enter a starting position: "))
end = int(input("Enter an ending position: "))
sliced_string = slice_from(string, start, end)โ€Š```
slate pier
#
def slice_from(string, start, end):
    print(string)
    print(start)
    print(end)
string = input("Enter a string: ") 
start = int(input("Enter a starting position: "))
end = int(input("Enter an ending position: "))
sliced_string = slice_from(string, start, end)
    ```
somber heath
#

!e ```py
def func(a):
print(a)

func('Woo!')โ€Š```

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

Woo!
paper tendon
#

So that func returns NoneType with value None. ๐Ÿ™‚

somber heath
#

!e ```python
def func():
return 'Woo!'

print(func())```

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

Woo!
somber heath
#

print('Woo!')

paper tendon
#

In computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programmi...

#

read about that

#

its nicely explained in general and for python

somber heath
#

None

paper tendon
#

!e ```

Python program to illustrate functions

can be passed as arguments to other functions

def shout(text):
return text.upper()

def whisper(text):
return text.lower()

def greet(func):
# storing the function in a variable
greeting = func("""Hi, I am created by a function
passed as an argument.""")
print (greeting)

greet(shout)
greet(whisper)

wise cargoBOT
#

@paper tendon :white_check_mark: Your eval job has completed with return code 0.

001 | HI, I AM CREATED BY A FUNCTION 
002 |                     PASSED AS AN ARGUMENT.
003 | hi, i am created by a function 
004 |                     passed as an argument.
slate pier
#
def slice_from(string, start, end):
    return
string = input("Enter a string: ") 
start = int(input("Enter a starting position: "))
end = int(input("Enter an ending position: "))
sliced_string = slice_from(string, start, end)
print(sliced_string) ```
wise cargoBOT
#

@paper tendon :x: Your eval job has completed with return code 1.

001 | Enter a string: Traceback (most recent call last):
002 |   File "<string>", line 3, in <module>
003 | EOFError: EOF when reading a line
slate pier
#
def slice_from(string, start, end):
    string = input("Enter a string: ") 
    start = int(input("Enter a starting position: "))
    end = int(input("Enter an ending position: "))
    sliced_string = slice_from(string, start, end)
    return
    print(sliced_string)  ```
paper tendon
#

he explains you bad way.

#

Just understand that input values you should have outside of a function if they are passed as parameter.

#

and return a sliced string.

#

๐Ÿ™‚

#

sliced strings

slate pier
#
def slice_from(string, start, end):
    return
string = input("Enter a string: ") 
start = int(input("Enter a starting position: "))
end = int(input("Enter an ending position: "))
sliced_string = slice_from(string, start, end)
print(sliced_string[start:end]) ```
paper tendon
#

b[2:5]

slate pier
#
def slice_from(string, start, end):
    return
string = input("Enter a string: ") 
start = int(input("Enter a starting position: "))
end = int(input("Enter an ending position: "))
sliced_string = slice_from([start:end])
print(sliced_string) ```
boreal spear
#
def ThisIsAFunction(Input):
  return "The input is " + Input
paper tendon
#

!e ```
def addition(a, b):
return a + b

wise cargoBOT
#

@paper tendon :warning: Your eval job has completed with return code 0.

[No output]
slate pier
#
def slice_from(string, start, end):
    return "The new string is " + string
string = input("Enter a string: ") 
start = int(input("Enter a starting position: "))
end = int(input("Enter an ending position: "))
sliced_string = slice_from([start:end])
print(sliced_string) 
wise cargoBOT
#

@paper tendon :warning: Your eval job has completed with return code 0.

[No output]
somber heath
#

!e python def func(a): return a[0] v = func('Hello') print(v)

wise cargoBOT
#

@somber heath :white_check_mark: Your eval job has completed with return code 0.

H
slate pier
#
def slice_from(string, start, end):
    return "The new string is " + [start:end]
string = input("Enter a string: ") 
start = int(input("Enter a starting position: "))
end = int(input("Enter an ending position: "))
sliced_string = slice_from(string, start, end)
print(sliced_string) 
paper tendon
#

!e ```
def addition(a, b):
return a + b

a = 3
b = 6
print(addition(a, b))

wise cargoBOT
#

@paper tendon :white_check_mark: Your eval job has completed with return code 0.

9
slate pier
#

@somber heath i'm ready for more when you are. I'll start working on my next piece of code

slate pier
#

nevermind i think i'm fried for tonight

livid cedar
#

yay i verified

#

!play epic sax man remix

#

waht

#

no music?

#

.play

#

ah

#

thats fair .-.

#

like spotify?

#

i just dont like talking .-.

#

im making a server for people with mental health issues to help them

#

one of my friends has one with like 83 members

#

yea i see where ur coming from

rugged root
#

I'll be on in a moment

#

Taking care of some work stuff real quick

somber heath
swift valley
#

Evenin' folks

tall latch
#

evenin

swift valley
#

Unicode input is nice

zealous wave
swift valley
#

Crispy compression

rugged root
#

Tasty

tall latch
rugged root
#

Not even the cookies?

golden hearth
#

hello :)

#

coding timeee

wind cobalt
#

snscrape --jsonl -search "nice dogs" > dogs.json

somber heath
#
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Options and arguments (and corresponding environment variables):
-b     : issue warnings about str(bytes_instance), str(bytearray_instance)
         and comparing bytes/bytearray with str. (-bb: issue errors)
-B     : don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x
-c cmd : program passed in as string (terminates option list)
-d     : debug output from parser; also PYTHONDEBUG=x
-E     : ignore PYTHON* environment variables (such as PYTHONPATH)
-h     : print this help message and exit (also --help)
-i     : inspect interactively after running script; forces a prompt even
         if stdin does not appear to be a terminal; also PYTHONINSPECT=x```
#

-i

swift valley
#

If you need parsing command-line args I suggest argparse or click

golden hearth
#

what does parsing mean?

swift valley
#

CPython is, yeah

#

(Micro/Circuit)Python as well

golden hearth
#

You people are so big brain ๐Ÿง 

whole bear
#

Hi guys i was scripting and i needed to download discord_webhook and everytime i try to download it i get this error:install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...

tall latch
gentle flint
#

@wind cobalt marhaba

golden hearth
#

your thing is the same as thors hammer

wind cobalt
#

@gentle flint marhaban bik,

golden hearth
#

but more destructive

tall latch
tall latch
rugged root
#

@whole bear Probably better if you ask your question here rather than in a DM to me. Typically the more people who can see the question, the more likely you are to get an answer

golden hearth
#

ye

#

and everyones worthy

whole bear
#

Hi guys i was scripting and i needed to download discord_webhook and everytime i try to download it i get this error:install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 file2
install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
[-o owner] file1 ... fileN directory
install -d [-v] [-g group] [-m mode] [-o owner] directory ...

golden hearth
#

we saw it ๐Ÿ‘€

whole bear
#

o sorry

golden hearth
#

idk what it means doe

swift valley
#

Dpy docs is more of an API reference than a tutorial to be fair

golden hearth
#

atleast it is understandable, its like a miracle to me

frozen oasis
#

yeah i was just trying to learn the api parallelly but yeah the docs arent that gr8 ๐Ÿ˜…

golden hearth
#

i thought it would be full of stuff iwont understand ๐Ÿ˜‚

#

eh

#

i think its cool

tall latch
hoary inlet
#

hi

golden hearth
#

In this video, I tell you the best IDE to use for programming. No matter what kind of programming you do.

๐Ÿ“š Video courses from JomaClass:
๐ŸŽ“ New to programming? Learn Python here: https://joma.tech/35gCJTd
๐ŸŽ“ Learn SQL for data science and data analytics: https://joma.tech/3nteQih
๐ŸŽ“ Data Structures and Algorithms: https://joma.tech/2W89H33

Music...

โ–ถ Play video
#

best vid on yt

sick cloud
#

noo

whole bear
#

@rugged root please bro

golden hearth
#

lol

whole bear
#

my account got hacked

sick cloud
#

unluckily

whole bear
#

freak

#

ok fine

#

alr

#

see ya

golden hearth
#

_>

sick cloud
#

@whole bear very interesting tag number lol

golden hearth
#

you were stupid enough to get yourslef hacked lol

rugged root
golden hearth
#

kk im srry

#

IM SRRY

#

no ban pls

sick cloud
#

Calm

tall latch
#

yes ban pytho nub pls

golden hearth
#

NO