Write a program that asks two people for their names; stores the names in variables called name1 and name2; says hello to both of them.

 

Answer:

Code:

name1 = input("Enter name 1: ") 

name2 = input("Enter name 2: ") 

print("Hello", name1) 

print ("Hello", name2)

 

Code - Teachoo.jpg

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo