Pandas

Last updated: April 13th, 20212021-04-13Project preview
In [1]:
import pandas as pd
import random as rd
In [ ]:
try:
    ox_num=input("how mush yoke(s) of oxen do you want for your wagon? (4 or 5?)")
    if ox_num == "4":
        oxens=[" "," "," "," "]
        ox_speed_1=rd.randint(8,16)
        ox_name_1=input("what is your horse name? \n")
        ox[0]=horse_name_1
        print(horse[0])
    elif ox_num == "5":
        ox=[" "," "," "," "," "]
        ox_speed_1=rd.randint(8,16)
        ox_speed_2=rd.randint(8,16)
        ox_speed_3=rd.randint(8,16)
        ox_speed_4=rd.randint(8,16)
        ox_speed_5=rd.randint(8,16)
        ox_name_1=input("what is your fisrt horse name? \n")
        ox_name_2=input("what is your second horse name? \n")
        ox_name_3=input("what is your third horse name? \n")
        ox_name_4=input("what is your fourth horse name? \n")
        ox_name_5=input("what is your fifth horse name? \n")
        ox[0]=ox_name_1
        ox[1]=ox_name_2
        ox[2]=ox_name_3
        ox[3]=ox_name_4
        ox[4]=ox_name_5
        print(ox[0]+", your first horse's speed is:",ox_speed_1)
        print(ox[1]+", your second horse's speed is:",ox_speed_2)
        print(ox[2]+", your third horse's speed is:",ox_speed_3)
        print(ox[3]+", your forth horse's speed is:",ox_speed_4)
        print(ox[4]+", your fifth horse's speed is:",ox_speed_5)
    else:
        print("invalid number or character. please select 1 or 2")
        while ox_num != "1" or "2":
            ox_num=input("how much horse(s) do you want? (1 or 2?)")
        if ox_num == "1":
            ox=[" "]
            ox_speed_1=rd.randint(8,55)
            ox_name_1=input("what is your horse name? \n")
            ox[0]=ox_name_1
            print(ox[0])
        elif ox_num == "2":
            ox=[" "," "]
            ox_speed_1=rd.randint(8,55)
            ox_speed_2=rd.randint(8,55)
            ox_name_1=input("what is your fisrt horse name? \n")
            ox_name_2=input("what is your second horse name? \n")
            ox[0]=ox_name_1
            ox[1]=ox_name_2
            print(ox[0]+", your first horse's speed is:",ox_speed_1)
            print(horse[1]+", your second horse's speed is:",horse_speed_2)
        if ox_num == '1' or '2':
            raise(KeyboardInterrupt)
except KeyboardInterrupt:
    print('okay?')
In [ ]:
try:
    horse_num=input("how mush horse(s) do you want? (1 or 2?)")
    if horse_num == "1":
        horse=[" "]
        horse_speed_1=rd.randint(8,55)
        horse_name_1=input("what is your horse name? \n")
        horse[0]=horse_name_1
        print(horse[0])
    elif horse_num == "2":
        horse=[" "," "]
        horse_speed_1=rd.randint(8,55)
        horse_speed_2=rd.randint(8,55)
        horse_name_1=input("what is your fisrt horse name? \n")
        horse_name_2=input("what is your second horse name? \n")
        horse[0]=horse_name_1
        horse[1]=horse_name_2
        print(horse[0]+", your first horse's speed is:",horse_speed_1)
        print(horse[1]+", your second horse's speed is:",horse_speed_2)
    else:
        print("invalid number or character. please select 1 or 2")
        while horse_num != "1" or "2":
            horse_num=input("how mush horse(s) do you want? (1 or 2?)")
            if horse_num == "1":
                horse=[" "]
                horse_speed_1=rd.randint(8,55)
                horse_name_1=input("what is your horse name? \n")
                horse[0]=horse_name_1
                print(horse[0])
            elif horse_num == "2":
                horse=[" "," "]
                horse_speed_1=rd.randint(8,55)
                horse_speed_2=rd.randint(8,55)
                horse_name_1=input("what is your fisrt horse name? \n")
                horse_name_2=input("what is your second horse name? \n")
                horse[0]=horse_name_1
                horse[1]=horse_name_2
                print(horse[0]+", your first horse's speed is:",horse_speed_1)
                print(horse[1]+", your second horse's speed is:",horse_speed_2)
            if horse_num == '1' or '2':
                raise(KeyboardInterrupt)
except KeyboardInterrupt:
    print('okay?')
In [ ]:
try:
    horse_num=input("how mush horse(s) do you want? (1 or 2?)")
    if horse_num == "1":
        horse=[" "]
        horse_speed_1=rd.randint(8,55)
        horse_name_1=input("what is your horse name? \n")
        horse[0]=horse_name_1
        print(horse[0])
    elif horse_num == "2":
        horse=[" "," "]
        horse_speed_1=rd.randint(8,55)
        horse_speed_2=rd.randint(8,55)
        horse_name_1=input("what is your fisrt horse name? \n")
        horse_name_2=input("what is your second horse name? \n")
        horse[0]=horse_name_1
        horse[1]=horse_name_2
        print(horse[0]+", your first horse's speed is:",horse_speed_1)
        print(horse[1]+", your second horse's speed is:",horse_speed_2)
    else:
        print("invalid number or character. please select 1 or 2")
        while horse_num != "1" or "2":
            horse_num=input("how mush horse(s) do you want? (1 or 2?)")
            if horse_num == "1":
                horse=[" "]
                horse_speed_1=rd.randint(8,55)
                horse_name_1=input("what is your horse name? \n")
                horse[0]=horse_name_1
                print(horse[0])
            elif horse_num == "2":
                horse=[" "," "]
                horse_speed_1=rd.randint(8,55)
                horse_speed_2=rd.randint(8,55)
                horse_name_1=input("what is your fisrt horse name? \n")
                horse_name_2=input("what is your second horse name? \n")
                horse[0]=horse_name_1
                horse[1]=horse_name_2
                print(horse[0]+", your first horse's speed is:",horse_speed_1)
                print(horse[1]+", your second horse's speed is:",horse_speed_2)
            if horse_num == '1' or '2':
                raise(KeyboardInterrupt)
except KeyboardInterrupt:
    print('okay?')
Notebooks AI
Notebooks AI Profile20060