Hello Bro, I tried to write the code. I don't know exactly why but when I just copied your above mentioned code my ''Pycharm'' gave me the next: Traceback (most recent call last): File "C:\Users\mirza\PycharmProjects\pythonProject\a.py", line 1, in import random File "C:\Users\mirza\PycharmProjects\pythonProject andom.py", line 4, in random.randint(x, y) ^^^^^^^^^^^^^^ AttributeError: partially initialized module 'random' has no attribute 'randint' (most likely due to a circular import)
Hi Bro... a question about this following syntax ----> # random.shuffle(cards) Why does this work? # random.shuffle(cards) #print(cards) and why does this not work?: card = random.shuffle(cards) print(card) the latter seems to follow the logic in your previous examples in this video. What am I missing?
Bcoz of you I had learn the coding and develop my skills and due to that i am able to get admission in IIT all bcoz of you thank you for your hardwork and dedication☺️☺️
Hi bro look at this: Enter a number between (1 - 100): 95 95 is too high Enter a number between (1 - 100): 93 93 is too low Enter a number between (1 - 100): 94 94 is too low Enter a number between (1 - 100): / 95 is tigh, 94 is to low What is happen?
Yeah exactly this... for already a few years, have had to randomize a d&d-esque game I have with my friends with the only major issue being that figuring out exactly what's been rolled takes a short time... I just need something coded so I can get a result with 1 click of a button. Trying to watch this, DLed Python, didn't get the screen I see, tried it with Visual (something) Code, didn't get anything either and then Microsoft wanting me to give Python language while I've already been typing that. I am left even more confused right now, tried with both JavaScript and Python. Having all the creativity to make something for my friends and I to enjoy without any of the skills besides typing on a keyboard like a rabid ape to actually pull it off efficiently.
Hi bro code , I habe a question about java swing. In your last java swing video (ping pong game) you used the "Rectangle" class. example: "Public class paddle extends Rectangle {" What does " extends Rectangle" mean ? I searched a lot but nobody talked about this on youtube or google before!
not sure if someone has answered this for you already or not, but that is how inheritance from a class works in Java! So in the example you give, Rectangle is the parent class to the child class Paddle. This gives Paddle (assumedly a new user created Class, I haven't seen his video) all the same attributes as the Rectangle included in the package he is using. In python it would look like this: class Paddle(Rectangle): QUICK EDIT -> tldr: Rectangle is a class that Paddle inherits from
I'd put your choices into an list, then call .choice(nameOfList) on it through while loop with the maximum number of characters you want in your number plate
Does anybody know how to remove the square brackets, speech marks, commas and spacing from the output? So if you were shuffling the cards, the output just read - 31JA957K etc?
Every language is better in its own way. Python is an interpreter language whereas C++ is a compiler language. Both languages have different uses for example python is mainly used in data science whereas C++ is used for developing OS or video games.
How would you weight options, like you were using a loaded dice? For example if you had a luck stat, it could increase your chance of a 6 or a face card.
import random low=1 highest=50 guesses=0 number=random.randint(low,highest) while True: texminler=int(input(f'Guess the number between {low} - {highest}: ')) if number==12: print('you doing well budy!') break elif number==24: print('your soo good!') break elif number==48: print('holyyy!!!') break else: print('another time budy !') i think this is much better huh?😃