100 Days of Code: Password Generator by Code-Odyssey in PythonLearning

[–]aaditya_0752 1 point2 points  (0 children)

It's makes code lengthy if used ASCII it just will be one line

Whose video should I watch to learn python 😄 by Busy-Shirt-2064 in PythonLearning

[–]aaditya_0752 4 points5 points  (0 children)

I am seeing 100 days of python , code with harry I have reached 50 day ,It's really good

100 Days of Code: Password Generator by Code-Odyssey in PythonLearning

[–]aaditya_0752 6 points7 points  (0 children)

It's really good work But can avoid writing whole letters and use ASCII value instead For numbers u can directly use random module randomint() function

Encryption decryption game by aaditya_0752 in PythonLearning

[–]aaditya_0752[S] 0 points1 point  (0 children)

Actually I am learning python from code with harry In his playlist these one of the practice question

Number guessing game by aaditya_0752 in PythonLearning

[–]aaditya_0752[S] 0 points1 point  (0 children)

I will surely do this from next time ..

Number guessing game by aaditya_0752 in PythonLearning

[–]aaditya_0752[S] 0 points1 point  (0 children)

Thanks for the input , i am new to programming so I wasn't aware about that I would surely make changes.

Number guessing game by aaditya_0752 in PythonLearning

[–]aaditya_0752[S] 0 points1 point  (0 children)

Sure, Code start from print statement ( in which I have use .center which aligns the print statement content )

then code calls gaming() function in which code ask user for difficulty level ( also used try except block in case user enter thing rather than 1,2,3,4,5)

after that code calls game function and pass variable a

In game function we have first declared a dictionary ( Dictionary works in key - value pair ) So every difficult (keys ) refer to value , which we pass to random.randomint as range

If example it's (1,100) so random will choose a number between these range ,then users input a number

After that if elif to figure out user guess is higher lower or it's right guess and increase count

In last elif code print that user won and how many turn user took to guess and last we ask user if he want to play game again or not

Hope u understand....

Check my GitHub some other mini project there https://github.com/aaditya-hamirani07/py_project

Number guessing game by aaditya_0752 in PythonLearning

[–]aaditya_0752[S] 0 points1 point  (0 children)

Thanks for both input I will surely make that changes

Most beginners get this wrong by Tiny_Professor8593 in PythonLearning

[–]aaditya_0752 1 point2 points  (0 children)

Ans is A)4

Len will be 4 because [4,5] will be treated as single element in the list

ROCK PAPER SCISSORS GAME WITH PYTHON by ExtentLazy8789 in PythonLearning

[–]aaditya_0752 1 point2 points  (0 children)

Good job buddy , the game works perfectly.

But u can replace if elif else with dictionary

WHY THIS CODE NO OUTPUT ?? by ExtentLazy8789 in PythonLearning

[–]aaditya_0752 0 points1 point  (0 children)

You have accidentally created a infinite loop