mercredi 12 février 2020

Executing both if and else statements in the last block

RAM = int(input("RAM amount: "))
if RAM >= 8:
 print ("Your RAM is good")
else:
 print ("not enough RAM")

HDD = int(input("Enter HDD or SSD storage space: "))
if HDD >=55:
 print("You have enough space")
else:
 print("You do not have enough space")

OS = input("Input Windows version ex: Windows 10: ")
if OS=="Windows 10":
 print ("You meet the minimum OS requirement")
if OS=="Windows 8.1":
 print ("You meet the minimum OS requirement")
if OS=="Windows 7":
 print ("You meet the minimum OS requirement")
if OS=="Linux":
 print("This OS is not supported")
if OS=="Mac":
 print("This OS is not supported")
else:
 print("Your OS does not meet the minimum requirements")

Not sure why both "You meet the minimum OS requirement" and "This OS is not supported" both print when I input a value.

Aucun commentaire:

Enregistrer un commentaire