10th Sep 2024, 3:53 PM
Himawari
Himawari - avatar
7 Respostas
+ 4
Naina Kapoor # no need to convert input to str # good idea to add a .strip() to the input to get rid of unintentional leading and trailing whitespaces in the input wife_name = input("Enter the wife name : ").strip() print(wife_name) husband_name = input("Enter the husband name : ").strip() print(husband_name) # simplify your slicing syntax v1 = wife_name [:3] v2 = husband_name [3:] couple_name = v1+v2 print ("couple name:", couple_name) ''' sample Sololearn input: Martha Hagried submit ''' # or Enelise, Sammy 😁
11th Sep 2024, 2:37 AM
Bob_Li
Bob_Li - avatar
+ 4
Thanks Bob_Li and Chris Coder for clearing my confusion 🙏❣️😆
11th Sep 2024, 11:48 AM
Himawari
Himawari - avatar
+ 3
default input is always string, so you don't need to convert it to string.... by the way: at me works; it shows: For multiple inputs, use new lines; this means: enter something <enter> enter something, run the code
10th Sep 2024, 4:29 PM
Mihaly Nyilas
Mihaly Nyilas - avatar
+ 3
Your code requires two inputs. You must submit the inputs on two separate lines in the playground. You'll receive an 'EOF' error if you don't submit the required amount of inputs.
10th Sep 2024, 10:18 PM
Chris Coder
Chris Coder - avatar
+ 2
and you have a slicing problem as well
10th Sep 2024, 4:33 PM
Mihaly Nyilas
Mihaly Nyilas - avatar
+ 2
Mihaly Nyilas sir can you please share me the correct code , I'm a sort of visual Lerner 😅👉👈
10th Sep 2024, 5:55 PM
Himawari
Himawari - avatar
+ 1
[http://www.google.com test keyword]
12th Sep 2024, 6:15 AM
Beverly William
Beverly William - avatar