subject

Write a program that asks for 'name' from the user and then asks for a number and stores the two in a dictionary (called 'the_dict') as key-value pair. the program then asks if the user wants to enter more data (more data (y/n)? ) and depending on user choice, either asks for another name-number pair or exits and stores the dictionary key, values in a list of tuples and prints the list. note: ignore the case where the name is already in the dictionary. example: name: pranshu number: 517-244-2426 more data (y/n)? y name: rich number: 517-842-5425 more data (y/n)? y name: alireza number: 517-432-5224 more data (y/n)? n [('alireza', '517-432-5224'), ('pranshu', '517-244-2426'), ('rich', '517-842-5425')]

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Jackson is teaching the decimal number system. he wants his students to know how to expand numbers by powers of 10. which is the correct order in which digits are assigned values in the decimal number system?
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Nikki sent flyers in the mail to all houses within the city limits promoting her computer repair service what type of promotion is this and example of
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
Anew author is in the process of negotiating a contract for a new romance novel. the publisher is offering three options. in the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. in the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. in the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. the author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option. write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. the program then outputs he royalties under each option and the best option the author could choose. (use appropriate named constants to store the special values such as royalty rates and fixed royalties.
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Hacer un algoritmo que me permita ingresar el nombre de una parcela de terreno y muestre junto al mensaje “tipo de suelos: suelos fumíferos, ¡excelente!
Answers: 1
You know the right answer?
Write a program that asks for 'name' from the user and then asks for a number and stores the two in...
Questions
question
Business, 02.08.2019 05:20
question
Mathematics, 02.08.2019 05:30
Questions on the website: 13722360