Advertisement
jkonoch

Can Upgrade - Boolean issue

Oct 3rd, 2021
1,156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. message = ""
  2.  
  3. def can_upgrade(m, s, os):
  4.  
  5.     if ((m >= 1) and (s >= 2.6)) and os == ('Windows 8' or 'Windows 7'):
  6.         message = "you can upgrade"
  7.         return message
  8.  
  9.     else:
  10.         message = "you can not upgrade"
  11.         return message
  12.  
  13. def main():
  14.     #  Gather inputs from user
  15.     memory = float(input("Memory:  "))
  16.     speed = float(input("Speed:  "))
  17.     cur_os = input("Current OS:  ")
  18.  
  19.     print(can_upgrade(memory,speed,cur_os))
  20.  
  21.  
  22. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement