Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7621959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:19:50+00:00 2026-05-31T04:19:50+00:00

Lets say Person 1 has a python executable file (mac) that was written in

  • 0

Lets say Person 1 has a python executable file (mac) that was written in Python 3.x. Person 1 sends said file to Person 2, who also has a mac, but only has Python 2.6.1. When Person 2 runs that file, will it work?

Someone said they needed to see the code, so:

#!/usr/bin/env python
# -*- coding: UTF8 -*-
topo1 = 0
topo2 = 0
print("This program helps compare two players: ")
print("It only uses that player's stats from the previous two years to determine their worth in fantasy baseball")
def complay1():
    global topo1
    print("Enter in the first player's stats below")
    homerun = input("Enter in the player's home run total from the most recent year: ")
    sb = input("Enter in the player's stolen base total from the most recent year: ")
    hit = input("Enter in the player's hit total from the most recent year: ")
    walks = input("Enter in the player's walk total from the most recent year: ")
    doubles = input("Enter in the player's doubles total from the most recent year: ")
    rbi = input("Enter in the player's RBI total from the most recent year: ")
    ba = input("Enter in the player's batting average from the most recent year, do not include a decimal point: ")
    hitL = input("Enter in the player's hit total from the year before the most recent year: ")
    homerunL = input("Enter in the player's home run total from the year before the most recent year: ")
    age = input("Enter in the player's age: ")
    gp = input("How many games did the player play last year?: ")
    topo1 += int(homerun)*3
    topo1 += int(sb)*2
    topo1 += int(hit)/2.5
    topo1 += int(walks)/4
    topo1 += int(doubles)
    topo1 += int(rbi)/3
    topo1 += int(hitL)/15
    topo1 += int(homerunL)
    topo1/(int(gp)/4)
    topo1 -= int(age)
    topo1 += int(ba)/2
    print(topo1, "is the total PLV+ for this player")
def complay2():
    global topo2
    print("Enter in the second player's stats below")
    homerun = input("Enter in the player's home run total from the most recent year: ")
    sb = input("Enter in the player's stolen base total from the most recent year: ")
    hit = input("Enter in the player's hit total from the most recent year: ")
    walks = input("Enter in the player's walk total from the most recent year: ")
    doubles = input("Enter in the player's doubles total from the most recent year: ")
    rbi = input("Enter in the player's RBI total from the most recent year: ")
    ba = input("Enter in the player's batting average from the most recent year, do not include a decimal point: ")
    hitL = input("Enter in the player's hit total from the year before the most recent year: ")
    homerunL = input("Enter in the player's home run total from the year before the most recent year: ")
    age = input("Enter in the player's age: ")
    gp = input("How many games did the player play last year?: ")
    topo2 += int(homerun)*3
    topo2 += int(sb)*2
    topo2 += int(hit)/2.5
    topo2 += int(walks)/4
    topo2 += int(doubles)
    topo2 += int(ba)/2
    topo2 += int(rbi)/3
    topo2 += int(hitL)/15
    topo2 += int(homerunL)
    topo2/(int(gp)/4)
    topo2 -= int(age)
    topo1 += int(ba)/2
    print(topo2, "is the total PLV+ for this player")       
complay1()    
complay2()
if topo1 > topo2:
    print("Player 1 is", ((topo1/topo2)*100)-100, "percent better")
if topo2 > topo1:
    print("Player 2 is", ((topo2/topo1)*100)-100, "percent better")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:19:51+00:00Added an answer on May 31, 2026 at 4:19 am

    Probably not, the major version changes have no backward compatiblity.

    EDIT: For your code example, it probably works. The only thing changed between 2 and 3 in your script is that print isn’t a function in Python 2, which is unimportant because print(x) is the same as print x for the Python 2 interpreter, extra brackets don’t hurt.

    EDIT2: The division will break too, as said in a different answer. This is because int/int will result in an int in Python 2 and in an float in Python 3. This means 5 / 2 is 2 in Python 2 and 2.5 in Python 3. from __future__ import division fixes this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say that one has a class like Person that has associated with it
Lets say I've a website that lists Persons, and each Person has multiple properties,
Lets say a Person has many Cars and they have a favorite Car. I
Lets say I have object Tom which has class Person. Class Person String Name
Say I have a Person object that has a first name, a last name
Lets say there is a Person class that holds some attributes and some other
Let's say I have a WCF service which has a method returning object Person.
Dumb question. Lets say I have a bunch of person objects with their fields
Lets say I have a million people objects that, when evaluated using person1.Matches(person2); return
Lets say that you have websites www.xyz.com and www.abc.com. Lets say that a user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.