• 1
    Input and Output Data
    • Tasks
  • 2
    Conditions
    • Tasks
  • 3
    For Loop
    • Tasks
  • 4
    Strings
    • Tasks
  • 5
    While Loop
    • Tasks
  • 6
    Lists
    • Tasks
  • 7
    Two-Dimensional Arrays
    • Tasks
  • 8
    Dictionaries
    • Tasks
  • 9
    Sets
    • Tasks
  • 10
    Functions and Recursion
    • Tasks
  • к

Занятие 8. Dictionary

Difficulty level:

Task«Family Handbook»

rn
the program should provide the following opportunities:
rn
rn
Adding a new family member to the reference book indicating its name, phone number, e-mail and address.
rn
output of information about all family members in the reference book.

Input format

command (line): rn
rn
add & nbsp;-add a new family member.
rn
search & nbsp;-Find information about the family member.
rn
edit & nbsp;-edit information about the family member.
rn
line & nbsp;-to display information about all family members.
rn
exit & nbsp;-complete the program.
rn rn
Adding a family member (after the & nbsp; admi ):
rn
rn
Name; (line).
rn
phone number (line). Justify; "> e-mail (line).
rn
address> address> address> (line).
rn rn
when searching or editing a family member (after Teams & nbsp; search & nbsp; or & nbsp; edit ): name (line). Style = "Text-align: justify;"> when editing (after the & nbsp; edit and name): field;"> field; "> for editing (line: & nbsp; Phone , & nbsp; email , & nbsp; address ) and n Value (line).

Output format

rn
a message about successful adding. Style = "Font-Size: 14pt;"> When searching:

rn
name: [name] name: name] Phone: [phone] email: [email] address: [address] if a family member was not found: "a family member"
rn

rn
If a member of "> if a member of Families were not found: "a family member was not found."
rn

rn
information about information about information about information about information about information about information Each family member in format, as when searching, is separated by an empty line.

Example

Input

Add
Ivan
+79123456789
IVAN@Example.com
st. Lenin, 1
search
Ivan
edit
Ivan
Phone
+79998887766
LIST
Exit

Output

A family member is successfully added.
Name: Ivan
Phone: +79123456789
Email: ivan@example.com
Address: ul. Lenin, 1
The phone information is successfully changed.
Name: Ivan
Phone: +79998887766
Email: Ivan@example.com
Address: st. Lenin, 1

Hint

There will be no clue here, decide for yourself!

main.py
Test 1
Test 2
Test 3
Test 4
Test 5
Test 6
Test 7
Test 8
Test 9
Test 10
Developer’s solution

🎉 Congratulations! 🎉

You did an excellent job with the task! It was a challenging problem, but you found the correct solution. You are one step closer to mastering programming! Keep up the good work, because every stage you pass makes you even stronger.

AD

Advertisement

red-snake blue-snake green-snake

Running your code...

Помощник ИИ

Привет! Я твой помощник по программированию. Задавай любые вопросы по Python, я могу рассказать о функциях, методах, обьяснить то, что тебе не понятно, а так же о текущей задаче!