Skip to main content

Posts

Why we should learn python ?

Why we should learn Python? Python is a general purpose programming language. Created nearly 30 years ago, it is now one of the most popular language.Its popularity is particularly important in the data science and machine learning fields. But it is also a language easy to learn, this explains why it has become the language the most taught in universities. Python interpreters are available for the main operating systems (Linux, Mac OS, Windows, Android, iOS, BSD, etc.). Python is easy to learn Python has a simple syntax that makes it suitable for learning programming as a first language. The learning curve is smoother than other languages such as Java, which quickly requires learning about Object Oriented Programming or C/C++ that requires to understand pointers. Still, it's possible to learn about OOP or functional programming in Python when the time comes. Python provides a well-furnished standard library and many external libraries are available. This allows to qu...
Recent posts

Random password generator program using python.

Random password generator Write a programme, which generates a random password for the user. Ask the user how long they want their password to be, and how many letters and numbers they want in their password. Have a mix of upper and lowercase letters, as well as numbers and symbols. The password should be a minimum of 6 characters long. import string import random import sys # Taking Password Length pass_len = int(input("Enter Password Length (Min. 6 & Max. 8 ): ")) # Checking for password is in range or not if pass_len < 6 or pass_len > 8:     print("Invalid password length!!, Min. 6 & Max. 8 Characters Allowed")     sys.exit(0) # Password's letters count letters_len = int(input("How many letters do you want? (Max. {} & Min. 0): ".format(pass_len))) # Password's numbers count num_len = int(input("How many numbers you want? (Max. {} & Min. 0): ".format(pass_len-letters_len...

assignment

import random n= random.randint(1, 99) guess = int(input("Enter an integer from 1 to 99: ")) while (n != "guess"):     print     if guess<n:         print ("guess is low")         guess=int(input("Enter an integer from 1 to 99: "))     elif guess>n:         print ("guess is high")         guess = int(input("Enter an integer from 1 to 99: "))     else:             print ("you guessed it!")             break             print