自动绘图(预测数据与实际数据之间存在差距)

时间:2018-10-06 04:48:08

标签: r

我已经尝试预测了2019年至2022年的数据。但是,当我绘制该图时,在2018年到2019年之间会有空白。是否可以在没有绘制2018年和2019年之间的差距的情况下绘制该图?

import random
first_roll = 0

def play():
    yesOrno = str(input('Would you like to play? '))
    yesOrno = yesOrno[0].lower()


    while yesOrno == 'y':
        throw_1 = random.randint(1,6)
        throw_2 = random.randint(1,6)
        total = throw_1 + throw_2


        if total == (2,12):
            yesOrno = str(input('You lost! Would you like to play again?'))
            yesOrno = yesOrno[0].lower()

        elif total == (7,11):
            yesOrno == str(input('You won! Would you like to play again?'))
            yesOrno = yesOrno[0].lower()

        else:
            first_roll == total

            while yesOrno == 'y':
                throw_1 = random.randint(1,6)
                throw_2 = random.randint(1,6)
                finalRoll = throw_1 + throw_2

                print('You rolled a',total)

                if total == 2 or 3 or 7 or 11 or 12:
                    yesOrno = str(input('You lost! Would you like to play again?'))
                    yesOrno = yesOrno[0].lower()
                    break

                elif total == first_roll:
                    yesOrno = str(input('You won! Would you like to play again?'))
                    yesOrno = yesOrno[0].lower()
                    break

                else:
                    yesOrno == 'y'

    print('Thanks for playing!')

play()

这是情节: enter image description here

0 个答案:

没有答案