0

New lines in python

gender=input("Are you a male or female") firstName=input("Enter your first name:") surname=input("Enter your surname: ") if gender.lower() == "male": name=RIGHT(surname,3) username=name+LEFT(firstName,2) print("This is your username: ",username) elif gender.lower() == "female": name=LEFT(firstName,3) username=name + LEFT(surname,2) print("This is your username: ",username) else: print("Error!") In this code, how would I separate the inputs with a new line?

17th Nov 2019, 9:04 AM
Shamima Xarif
Shamima Xarif - avatar
2 ответов
+ 2
You can use "\n" for a line break, but you can't really seperate inputs in SoloLearn
17th Nov 2019, 9:53 AM
Jannik Müller
Jannik Müller - avatar
+ 2
in sololearn you can’t really seperate the inputs. everything needs to put in at the strt of running the code. everytime you have a seperate input it will need a seperate line in the input screen
17th Nov 2019, 9:09 AM
Brave Tea
Brave Tea - avatar