Skip to content

natnew/Python-Projects-Friendship-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Python Projects: Friendship Calculator 🐍

Python Script
This repo contains python code that generates a friendship score based on the names you enter.
Run the code.

Python

alphabet = 'abcdefghijklmnopqrstuvwxyz'
key = 3
newMessage = ' '
score = 0

message = input('Enter the names of two people: ')

for character in message:
    position = alphabet.find(character)
    newPosition = (position + key) % 26
    print(newPosition)
    score += newPosition
    
    


print('Your friendship score is: ' + str(score))

Output

Your frendship score is: 60

About

Python Projects Friendship Calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages