Answer to Question #227171 in Python for Kirthana

Question #227171
Challenge Part A 1. Let user input his/her first name dan last name separately. Then combine first name dan last name together. 2. Let user input 2 number. Multiply the numbers dan show the answer. 3. Let user input his/her name dan age. Then show this two in a sentence. 4. Let 3 users to key in their height in decimal place. Then show the highest [ use max ()] among these 3 users dan their average height.
1
Expert's answer
2021-08-18T11:19:54-0400
first_name = input('Enter your first name here: ')
surname = input('Enter your surname here: ')
print(first_name + ' ' + surname)

Enter your first name here: Donald
Enter your surname here: Trump
Donald Trump

first_no = int(input('Enter first number here: '))
second_no = int(input('Enter second number here: '))
print(first_no * second_no)

Enter first number here: 34
Enter second number here: 12
408

name = input('Enter your name here:')
age = input('Enter your age here:')
print('My name is {} and I am {} years old'.format(name, age) )

Enter your name here:Ariana Grande
Enter your age here:21
My name is Ariana Grande and I am 21 years old

list1 = []
user1 = float(input('Enter your height here: '))
list1.append(user1)
user2 = float(input('Enter your height here: '))
list1.append(user2)
user3 = float(input('Enter your height here: '))
list1.append(user3)
print(max(list1))
sum = 0
for i in list1:
  sum = sum + i
print(sum/3)

Enter your height here: 154.9
Enter your height here: 178.9
Enter your height here: 180.9
180.9
171.5666666666667

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS