0
Initials
You need to take the first and last name of a person as input and output the initials (first letters of the first and last name). Sample Input James Smith Sample Output J.S. Can not get the . In my code please help fname = input() lname = input() str = fname str1 = lname x= ([0]) y= (str1[0]) print(x,y,)
4 Respuestas
+ 3
x = str[0]
Also, you can concatenate two/more strings using `+` operator.
+ 2
You need to use single or double quotes to denote a string.
'Mark' or "Crawford"
+ 1
It's very simple:
fname = input()
lname = input()
print(fname[0]+"."+lname[0]+".")
0
Ok that worked so now i have JS how do I get it to look like J.S. I tried print(x+”.”+y+”.”) did not work