https://dev.to/rose_michelle/beginner-friendly-python-projects-with-source-code-234e https://www.programiz.com/python-programming/online-compiler/ #importing module for random number generation import random # τιμές ζαριού ελάχιστη, μέγιστη min_timi = 1 max_timi = 6 thes_xana = "y" while thes_xana =="y": print(" το pc ρίχνει 2 ζαρια..") # delay print(" οι αριθμοί είναι...") print( random.randint(min_timi, max_timi)) print( random.randint(min_timi, max_timi)) thes_xana = input(" θες να δοκιμάσεις ξανά y or n " ) *********************************************************** ergasies = [] def add_anathesi(): d = input("δωσε νέα δουλειά ") ergasies.append(d) print("προσθέθηκε η δουλειά", d) def view_anatheseis(): mikos = len(ergasies) if mikos == 0: print("ευτυχώς δεν έχω καμία δουλειά ") else: print("πρέπει να κάνω τα εξής", ergasies ) def delete_anathesi(): mikos = len(ergasies) if mikos == 0: print('δεν υπάρχουν εργασίες προς διαγραφεί η λίστα ειναι ΑΔΕΙΑ') else: for i in range(mikos): print( ergasies[i], "αριθμος εργασίας", i+1) x= input(" ποια εργασία - αριθμό θέλεις να διαγράψεις???" ) while x<0 or x>mikos: print(" το x πρέπει να είναι απο 1 εως", mikos) ergasies.pop(i) print(" οι εργασίες που απομένουν είναι", ergasies) def menu(): while True: print("1. πρόσθεσε δουλειά 2. προεπισκόπηση 3. διαγραφή δουλείας 4. ΕΞΟΧΟΣ ΑΠΟ ΤΟ ΜΕΝΟΥ") choice = input("Enter your choice: ") if choice == '1': add_anathesi() elif choice == '2': view_anatheseis () elif choice == '3': delete_anathesi() elif choice == '4': print("ΣΑΣ ΠΕΡΙΜΕΝΟΥΜΕ ΞΑΝΑ") break else: print("λάθος αριθμός, προσπάθησε ξανά 1-4...") menu() ergasies = [] def add_anathesi(): d = input("δωσε νέα δουλειά ") ergasies.append(d) print("προσθέθηκε η δουλειά", d) def view_anatheseis(): mikos = len(ergasies) if mikos == 0: print("ευτυχώς δεν έχω καμία δουλειά ") else: print("πρέπει να κάνω τα εξής", ergasies ) def delete_anathesi(): mikos = len(ergasies) if mikos == 0: print('δεν υπάρχουν εργασίες προς διαγραφεί η λίστα ειναι ΑΔΕΙΑ') else: for i in range(mikos): print( ergasies[i], "αριθμος εργασίας", i+1) x= int(input(" ποια εργασία - αριθμό θέλεις να διαγράψεις???" ) ) while x<=0 or x>mikos: print(" το x πρέπει να είναι απο 1 εως", mikos) x= int(input(" ποια εργασία - αριθμό θέλεις να διαγράψεις???" ) ) ergasies.pop(x-1) print(" οι εργασίες που απομένουν είναι", ergasies) def menu(): while True: print("1. πρόσθεσε δουλειά 2. προεπισκόπηση 3. διαγραφή δουλείας 4. ΕΞΟΧΟΣ ΑΠΟ ΤΟ ΜΕΝΟΥ") choice = input("Enter your choice: ") if choice == '1': add_anathesi() elif choice == '2': view_anatheseis () elif choice == '3': delete_anathesi() elif choice == '4': print("ΣΑΣ ΠΕΡΙΜΕΝΟΥΜΕ ΞΑΝΑ") break else: print("λάθος αριθμός, προσπάθησε ξανά 1-4...") menu() ****************************************************************************** import random def play_game(): choices = ["rock", "paper", "scissors"] computer_choice = random.choice(choices) player_choice = input("Enter rock, paper, or scissors: ").lower() if player_choice not in choices: print("Invalid choice. Please try again.") return print(f"Computer chose: {computer_choice}") if player_choice == computer_choice: print("It's a tie!") elif (player_choice == "rock" and computer_choice == "scissors") or \ (player_choice == "paper" and computer_choice == "rock") or \ (player_choice == "scissors" and computer_choice == "paper"): print("You win!") else: print("You lose.") play_game()