Posts

Calculator in Python

https://replit.com/@LukmanA47/Calculator-published-on-06122021-at-1002pm#main.py   #menu def menu(): print("[1] Addition") print("[2] Multiplication") print("[3] Subtraction") print("[4] Divison") print("[5] End") option = int(input("Enter your Option: ")) if option == 1: addition() elif option == 2: multiplication() elif option == 3: subtraction() elif option == 4: divison() elif option == 5: finish() if option > 5: print("You typed the wrong number") print() menu() #ending the programm def finish(): quit print("Ended") print("Created by Lukman on 06/12/2021 at 9.50PM") def addition(): num1 = int(input("First Number: ")) num2 = int(input("Second Number: ")) print("Answer is: ",num1 + num2) def multiplication(): num1 = int(inpu

MY REPL ACCOUNT

https://replit.com/@LukmanA47

[Simple] Maths Quiz

print("Welcome to the math QUiz") print("[To pass you need to score 4/6]") score = 0 quiz1 = input("[1] What is 3(2+1)+4(5+1) ") if quiz1 == "33": print("Correct") score = score + 1 else: print("Incorrect") print("Points:" ,score) quiz2 = input("[2] When x = 3 and p = 1 what 10(x+p): ") if quiz2 == "40": print("Correct") score = score + 1 else: print("Incorrect") print("Points:" ,score) quiz3 = input("[3] What is 6000000/3000000: ") if quiz3 == "2": print("Correct") score = score + 1 else: print("Incorrect") print("Points:" ,score) quiz4 = input("[4] When was srk born?(YEAR) ") if quiz4 == "1965": print("Correct") score = score + 1 else: print("Visakha dumb") print("Points:" ,score) if score == 4: print("You pass!") else: print(&quo

[Simple] Shopping list Maker

  #shoping list maker #menu def menu(): print("[1] View shopping List") print("[2] End") option = int(input("Enter your option: ".upper())) if option == 1: view() elif option == 2: finish() make = input("Enter your shopping list: ") def create_list(): print("Make sure to use comma [,] to seperate items") make() print("--------------------------") menu() def view(): print("VIew shopping list") print("---->", make) print("--------------------------") menu() def finish(): print("Programm has ended.") quit #inint menu() #replit: https://replit.com/@LukmanA47/shopping-list?v=1

Scoreboard Unit 4 - programming

proper example : see at replit (below)   #https://replit.com/@j4bba/Tournament-Scoring-System my example: print('''Welcome to the torunament Scoring System! Before proceeding to the main menu, Please Input the four team names Below: ''') team1 = input("Team 1: ") team2 = input("Team 2: ") team3 = input("Team 3: ") team4 = input("Team 4: ") def team_members(): print('''=============== = Select Team = =============== ''') print("[1]", team1) print("[2]" ,team2) print("[3]" ,team3) print("[4]" ,team4) chose_team = int(input("Choose Your team: ")) if chose_team == 1: print(input("Name 1: ")) print(input("Name 2: ")) print(input("Name 3: ")) print(input("Name 4: ")) print(input("Name 5: ")) question = input("Did you input

Password Generator Beginner

 Need a password, but cant think of one?? No need to worry, simply create your own password generator with these simple python codes:  (wrote by frazmetic) Analysis of the code:  import random = imports the random module (this will allow choosing different numbers) int = integer range(number), range(length) = this will get data from the user since it includes an input and will output how many passwords and the length of it. password +=   = this means it will add numbers and length and give instant results  random.choice  = randomly selected element from the specified sequence (which is "chars") #password generator import random chars = "abcedfghijklmonpqrstuvwxyzABCDEFGHIJKLMONPQRSTUVWXYZ12345678890<>?@:{}+_-!@.//^" number = input("How many passwords do you want?: ") number = int(number) length = input("Length of the Password: ") length = int(length) for i in range(number): password = "" for a in range(length): password