hello, this assignment was solve in c++ but I need it in Python programming please please please. and also the speudocode as well. thank you.. Problem: Your company wants to give out prizes to the first ten people in line at a sale. In order to give out the prizes, the winners names and email addresses are to be captured. When ten names and email addresses are entered, the list of winners is to be displayed. Sample Output: Winners of the Prizes Name Email ======================================== Thor of Asgard [email protected] Mickey Mouse [email protected] Harry Potter [email protected] Captain Marvel [email protected] Aquaman [email protected] Goofy Dog [email protected] Buzz Lightyear [email protected] Donald Duck [email protected] Tweety Bird [email protected] Sheldon Cooper [email protected]
speudocode:
names = []
emails = []
for loop 10 times:
name = input from user
email = input from user
names.add(name)
emails.add(email)
end of loop
for loop 10 times:
print name and email
end of loop
code:
#take 10 names and emails from user
names = []
emails = []
for i in range(10):
#take name and email from user
name = input("Enter name : ")
email = input("Enter Email : ")
#add name and emails to lists
names.append(name)
emails.append(email)
#print winners
print("Winners of the Prizes")
print("{:<20}{:<}".format("Name","Email"))
for i in range(10):
print("{:<20}{:<}".format(names[i],emails[i]))
@MohammedAli7/HospitableUnusualFilename share + new repl my repls languages g8 talk MohammedAl.. No description game jom Press F11 to exit full screen Files&inpy saved 1 #take 10 names and emai Python 3.6.1 (default, Dec 2015, 13:05:11) [GCC 4.8.2] on linux Enter name Thor of asgard Enter Enail: [email protected] Enter nae Mickey Mouse Enter Enail: [email protected] Enter name Harry Potter Enter Enail: [email protected] Enter name Goofy Dog Enter Enail: [email protected] Enter naeBuzz Lightyear Enter Enail: buzzepixar.com Enter name Donald Duck Enter Enail: [email protected] Enter name Tweety Bird Enter Enail: [email protected] Enter nae Sheldon cooper Enter Enail: [email protected] Enter name Ironnan Enter Enail: [email protected] Enter name Captain Anerica Enter Enail: [email protected] Winners of the Prizes Nane Thor of asgard Mickey Mouse Harry Potter Goofy Dog Buzz Lightyear Donald Duck Tweety Bird Sheldon cooper Ironman D main.py 2 names[ 3 emails 4 for i in range(10): #take name and email from user 6 nameinput("Enter name) 7 email input("Ener Email : ") #add name and emails to lists names.append (name) emails.append (email) 18 11 #print winners 12 print("Winners of the Prizes" 13 print(":<20:<".format("Name", "Email")) 4 for i in range(10): 15 print(":<20.format (namesi],emails[i])) 16 Enail [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] tweetyglooneytunes.con [email protected] [email protected] Captain [email protected]
Hello, this assignment was solve in c++ but I need it in Python programming please please please....