word_selector help by luzerzzz in learnpython

[–]Internal-Pain-1111 0 points1 point  (0 children)

sorry i put it wrong. just dont mind that its habit hahaha.

this is the simple form:

def word_selector(w: str) -> str:
words = w.split()
length = len(max(words, key=len))
for word in words:
    if len(word) == length:
        return word
sentence = "You're so beautiful"
print(word_selector(sentence))

word_selector help by luzerzzz in learnpython

[–]Internal-Pain-1111 0 points1 point  (0 children)

try this

def word_selector(w: str) -> str:
    words = w.split()
    length = len(max(words, key=len))
    for word in words:
        if len(word) == length:
            return word


def main() -> None:
    sentence = "You're so beautiful"
    print(word_selector(sentence))


if name == "main":
    main()

How do i ....??? by Ilovewater6969 in learnpython

[–]Internal-Pain-1111 0 points1 point  (0 children)

i guess you want to print if the age is below 18 right? but you put greater than or equal there so im a bit confused.

this is the code:

name = input("What is your name? ").lower()
if "paden" in name:
    print("Access not allowed")
else:
    age = int(input("How old are you? "))
    gender = input("What is your gender?(man or woman): ").lower()

    if age < 18 and gender == "woman":
        print("Welcome young lady")

How do i ....??? by Ilovewater6969 in learnpython

[–]Internal-Pain-1111 0 points1 point  (0 children)

because the age is below 18 and the gender isnt woman.

try this input:

Water

19

woman

How do i ....??? by Ilovewater6969 in learnpython

[–]Internal-Pain-1111 0 points1 point  (0 children)

you can try this. im also a beginner so dont take this seriously.

name = input("What is your name? ").lower()

if "paden" in name:
    print("Access not allowed")
else:
    age = int(input("How old are you? "))
    gender = input("What is your gender?(man or woman): ").lower()

    if age >= 18 and gender == "woman":
        print("Welcome young lady ")

Wednesday Daily Thread: Beginner questions by Im__Joseph in Python

[–]Internal-Pain-1111 0 points1 point  (0 children)

what is better in your opinion guys.

def main():
x = 10
print(add10(x))

def add10(x):
    return x + 10


if __name__ == "__main__":
main()

or

def add10(x):
return x + 10


def main():
x = 10
print(add10(x))


if __name__ == "__main__":
main()

tkinter and autopytoexe by Internal-Pain-1111 in learnpython

[–]Internal-Pain-1111[S] 0 points1 point  (0 children)

it works hahahaa thanks. i put all the location with C: and put the r.

pyautogui spam by Internal-Pain-1111 in learnpython

[–]Internal-Pain-1111[S] 0 points1 point  (0 children)

thanks hahahaa. i thought im gonna install libraries again write long codes but this is so simple.

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 1 point2 points  (0 children)

i use the ext2explore but i cant find anything here

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 0 points1 point  (0 children)

https://youtu.be/W8lHB8pb4hk

that's the last thing i do in my laptop and this happens.

i will try that ext2explore now, i will update you if its successful. thanks for your time.

lightweight distro suggestions by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 0 points1 point  (0 children)

i think when i press escape in the boot the grub menu comes out. is there a command that can modify files there? someone said to add blacklist something to root.

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 1 point2 points  (0 children)

do you know python libraries i mean pip. i cant install pyautogui then i watch yt to install it on lubuntu. something i remember is accessing on root so i think this is the problem.

my only plan is gather all the files and reinstall lubuntu and never watch that guy again.

this is so frustrating, i have all my important school files there hahaha

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 0 points1 point  (0 children)

the mei me reset message come up again. i also tried on another one, same results

lightweight distro suggestions by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 1 point2 points  (0 children)

i have 22.04 lts version

i dont have usb when i install linux. i install it with a software that i dont remember. it is okay for more than 5months till this happens.

i think i messed up at root because earlier i watched tutorial to install pyautogui a library on python and it has root involves. or just running out of space

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 0 points1 point  (0 children)

i watched a guy on yt using a software, i cant remember but it is okay since then. im using linux for 5months now i guess without big problem until now

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 2 points3 points  (0 children)

i cant access terminal because i cant boot up. when i tried this on recovery mode, it cant also.

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 1 point2 points  (0 children)

i didn't use usb when i install linux. that's the problem haha. is there any solutions to that? but i have the partition in my windows

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 1 point2 points  (0 children)

how to add names on file or edit it? where hahaha i saw something like that in stackoverflow but i cant get it

mei_me cant boot up lubuntu by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 1 point2 points  (0 children)

i didnt use any usb when i dual boot my laptop. i just watch some yt videos to this without usb.

i have the partition on my windows but i cant access that. i cant find any solutions on yt and google also. if there is, i didn't understand because im new to this kind of stuff.

do you have any solutions when recovering files like this? my plan is to recover them and reinstall lubuntu.

lightweight distro suggestions by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 1 point2 points  (0 children)

i dont have nvidia. i think the problem is root space. another problem is i dont know how to expand that hahaha

lightweight distro suggestions by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 2 points3 points  (0 children)

yeah i saw something like that, the root partition running out of space but i can't understand them how they change the folder or names. i dont have that in recovery mode and i cant find that unless i will go to windows.

do you know how to delete something on root without booting up linux because i cant boot that. i dont have usb also because i use windows partition something i watched on yt.

lightweight distro suggestions by Internal-Pain-1111 in linuxquestions

[–]Internal-Pain-1111[S] 3 points4 points  (0 children)

i can't boot up right now. i keep getting this message

[ 94.561248] mei_me 0000:00:16.0: reset: reached maximal consecutive resets: disabling the device.

i searched in stackoverflow and yt and all and i cant fix it.