H
H
hlystik2021-11-05 21:29:08
Python
hlystik, 2021-11-05 21:29:08

Why is the contents of the variable not displayed in its entirety?

Why is the contents of the variable not displayed in its entirety?
Please forgive me if the question is trivial.
The code in which I worked was given below, as well as the command line screen

import json

def users_persone():
  name = input('Введите имя контакта - ')
  tel = input('Введите номер - ')

  persone = {

  name:tel

  }
  return persone

def main():

  persones = []

  persones.append(users_persone())

  with open('persones.json', 'w') as file:
    json.dump(persones, file, ensure_ascii = False)

  print('Контакт добавлен ^_^')

users_choise = input("Желаете ввести или получить контактные данные - ")



if users_choise == 'ввести':
  main()


elif users_choise == 'получить':
  users_input_name = input("Введите имя пользователя - ")


users_choise_two = input("Желаете остановить програму - ")

if users_choise_two == 'да':
  print("Програмам закрита ^_^")

elif users_choise_two == 'нет':
  print(users_choise)


618577d3c1a71139995740.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bogdan, 2021-11-05
@hlystik

you need to put the loop on until the person answers that he wants to stop the program, it will not end

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question