Learn Python Variable Types
Apples = input("Enter the Value of Apples: ")
Oranges = input("Enter the Value of Oranges: ")
print (Apples)
print (Oranges)
#print (Apples + Oranges)
print ("Before typecasting, type of Apples is ", type(Apples))
print ("Before typecasting, type of Oranges is ", type(Oranges))
Apples = int(Apples) #casting from string to integer
Oranges = int(Oranges) #casting from string to integer
print ("After typecasting, type of Apples is ", type(Apples))
print ("After typecasting, type of Oranges is ", type(Oranges))
print (Apples)
print (Oranges)
print ("Total fruits, result is ", Apples + Oranges)
Sur cette page du site, vous pouvez voir la vidéo en ligne Learn Python Programming 7 - Variable Types and Type Casting (with Examples) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur TNTeach #NCERT #CBSE #Python 23 août 2019, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 112 fois et il a aimé 11 téléspectateurs. Bon visionnage!