` #1 a=int("What do you want to calculate?" 1. Molar concentration 2. PPM concentration 3. Percent concentration")
#2 a = map(int,input("What do you want to calculate? 1. molar concentration 2. PPM concentration 3.percent concentration") `
Both forms are possible.
As explained above, the return of input() is always a string. Therefore, expressions belonging to the if, elif, and else statements must also be modified to int(input()) or float(input()).
It is recommended that you always memorize the return of Python
input() as a string.
if int(a) == 1: Please convert all integers.
© 2022 pinfo. All rights reserved.