Coin flip simulator with GUI
Nice program, so only some tips:



First of all, you comments are very useful for you as a beginner but without them your code is much nicer:

class coinflipsimulator(QWidget):

    def __init__(self):
        super().__init__()

        self.initUI()

    def initUI(self):
        self.coin = QLabel(self)
        self.coin.setPixmap(QPixmap('coin_' + str(randint(1, 2)) + '.png').scaled(162, 302, Qt.KeepAspectRatio, Qt.FastTransformation))
        self.coin.move(0.5, 0.5)

        self.btn = QPushButton('Flip', self)
        self.btn.setFont(QFont('SansSerif', 20))
        self.btn.setToolTip('Click to Flip Coin')
        QToolTip.setFont(QFont('SansSerif', 10))
        self.btn.clicked.connect(self.flipcoin)
        self.btn.resize(166, 43)
        self.btn.move(-2, 161)

        self.setGeometry(1427, 30, 162, 201)
        self.setFixedSize(self.size())
        self.setWindowTitle('Coin Flip Simulator')
        self.setWindowIcon(QIcon('icon.png'))      
        self.show()

    def flipcoin(self):
        self.coin.setPixmap(QPixmap('coin_flipping_animation.png').scaled(162, 302, Qt.KeepAspectRatio, Qt.FastTransformation))
        QApplication.processEvents()
        sleep(0.5)
        self.coin.setPixmap(QPixmap('coin_' + str(randint(1, 2)) + '.png').scaled(162, 302, Qt.KeepAspectRatio, Qt.FastTransformation))
        QApplication.processEvents()



if __name__ == '__main__':

    app = QApplication(argv)
    ex = coinflipsimulator()
    ex.show()
    exit(app.exec_())




Follow the DRY principle (Don't Repeat Yourself). In your code is 2 times the same statement

self.coin.setPixmap(QPixmap('coin_' + str(randint(1, 2)) + '.png').scaled(162, 302, Qt.KeepAspectRatio, Qt.FastTransformation))


In them you repeatedly construct one of two picture names:

coin_1.png
coin_2.png


Why not create a list or a tuple of them, e. g.

COINS = ('coin1.png', 'coin_2.png')


(note the use of uppercase letters for its name as a signal that it will not change) and instead of the

randint(1, 2)


use

choice(COINS)


Or - even better - create the list or tuple of 2 QPixmap objects and apply the choice() function on it?



Hard-coded file names (as the 2 mentioned above) are spread in your code so it will be more difficult to search for them in the case for the need of change them.

What about give all of them (together with other constants) appropriate names near the start of your, e. g.

ICON = 'icon.png'
SLEEP_TIME = .5


and then use those names?



You may even create constants for parameter lists of functions / methods - as you use the same again and again - and then use them, e. g.

SCALED_PARMS = 162, 302, Qt.KeepAspectRatio, Qt.FastTransformation


and then use them in the form

.scaled(*SCALED_PARMS)     # This is only the part of your command


(note the asterisk (*) in front of them for unpacking the ones).