לדלג לתוכן

4.5 פרויקט תוכנת תרגום פרויקט

הקדמה (פרויקט קשה)

  • אתה הולך לפתח תוכנת תרגום.

דרישת הפרויקט

  • אתה צריך לבנות תוכנה המאפשרת למשתמש להוסיף תרגום למילון
  • יש לשמור את המילון כקובץ
  • צריכה להיות פונקציונליות של תרגום משפטים על ידי מילון שנשמר כקובץ.
  • טיפ: השתמשו בsplit! זה יכול לעזור לכם בפעולת תרגום!
  • בונוס: צור תמיכה במספר שפות
  • בונוס: אתה יכול לנסות למצוא באינטרנט מילון ולחבר אותו אל התוכנית שלך.

דוגמה לפלט:

  • ריצה ראשונה של התוכנה:
    welcome to the dictionary! 
    what do you want to do today?
    1. translate a sentence
    2. add a new word translation
    3. list all translation
    
    choose action: 2
    enter a word: hello
    enter translation: hi
    added translation hello -> hi to dictionary!
    
    choose action: 3
    dictionary:
    hello -> shalom
    
    choose action: 2
    enter a word: world
    enter translation: olam
    added translation world -> olam to dictionary!
    
    choose action: 3
    dictionary:
    hello -> shalpom
    world -> olam
    
    choose action: 1
    enter a sentence to translate: hello world
    translation: shalom olam
    
  • שימו לב שפלט זה לא כולל את הבונוס!

בהצלחה.