+ 4
Why it is giving me END OF FILE error
https://sololearn.com/compiler-playground/ce0jDjjqHZCN/?ref=app
7 Answers
+ 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 đ
+ 4
Thanks Bob_Li and Chris Coder for clearing my confusion đâŁïžđ
+ 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
+ 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.
+ 2
and you have a slicing problem as well
+ 2
Mihaly Nyilas sir can you please share me the correct code , I'm a sort of visual Lerner đ
đđ
+ 1
[http://www.google.com test keyword]