i have a question about this script
if i press empty it will occur ValueError: invalid literal for int() with base 10: ''
Do anyone know why or how to change it.
code description:
if i press empty it should print 5, and if i enter10, it should print 10, something like that.
if i press empty it will occur ValueError: invalid literal for int() with base 10: ''
Do anyone know why or how to change it.
code description:
if i press empty it should print 5, and if i enter10, it should print 10, something like that.
import subprocess import os input11= 5 input_no= int(input("Enter a number: ")) if input_no =='': input_no=input11 print(input_no)