程序员爱情故事-3

爱你一万年

def love(years):
    if years == 0:
        return "I love you forever"
    else:
        return "I love you " + str(years) + 
         " years\n" + 
         love(years - 1)

print(love(10000))

渣女

let you = 
["舔狗", "备胎", "观望中", "了解中", "深入了解中", 
"陌生人", "暧昧中", "热恋中", "分手中", "复合中", 
"单身中", "已婚中", "离婚中", "约会中", "挂念中",
"失联中", "闺蜜中", "死党中", "暗恋中", "表白中"];
 
let me = you[Math.floor(Math.random() * you.length)]; 
console.log(`You are ${me}.`); 
if (me == "热恋中" || me == "复合中" 
|| me == "已婚中" || me == "表白中") {
    console.log("I love you."); 
    } else {
    console.log("I don't love you.");
}

你可能感兴趣的:(程序员爱情故事-3)