QNA > W > Where Can I Find Somebody To Write A Python Program For A Flames Game?

Where can I find somebody to write a Python program for a FLAMES game?

Python program for FLAMES game according to the rules specified in the above video:

  1. def flames(name1, name2): 
  2. for i in range(len(name1)): 
  3. for j in range(len(name2)): 
  4. if(name1[i]==name2[j]): 
  5. name2=name2.replace(name2[j],"*") 
  6. break 
  7. #print(name1) 
  8. #print(name2) 
  9. t=name2.count('*')*2 
  10. print(t) 
  11. results = ['friend','love','affection','marriage','enemy','sister'] 
  12. t=len(name1)+len(name2)-t-1 
  13. #print(t) 
  14. i=-1 
  15. while(len(results)>1):  
  16. count=-1 
  17. while(count
  18. count=count+1 
  19. i=(i+1)%len(results)  
  20. results.remove(results[i-1])  
  21. return results[0] 
  22.  
  23. name1 = input('Enter name of first person: ').casefold() 
  24. name2 = input('Enter name of second person: ').casefold() 
  25. print('Relationship is', flames(name1, name2)) 

Some Test cases:

1.

Enter name of first person: amit

Enter name of second person: deepika

Relationship is enemy

2.

Enter name of first person: ira

Enter name of second person: aman

Relationship is affection

Di Tollmann

Come aggiungere la grafica dell'impiccato nel mio gioco dell'impiccato in Python :: Come codificare gli scacchi e costruire un motore di scacchi in Python
Link utili