How to input an integer in Python

1 Answer

0 votes
num = int(input("Enter a number: "))

print('num = ', num)

'''
run:

Enter a number: 100
num =  100

'''

 



answered Feb 20, 2016 by avibootz

Related questions

3 answers 382 views
2 answers 322 views
1 answer 301 views
301 views asked Sep 11, 2018 by avibootz
2 answers 367 views
1 answer 253 views
1 answer 234 views
234 views asked Jul 12, 2023 by avibootz
...