68.4k views
4 votes
X = int(input("Enter a number: ")) print (x) What happens if the user types in A?

2 Answers

4 votes

The actual answer is: This would cause an error: an integer variable cannot store a string

hope this helped

User Ganesh MB
by
7.9k points
3 votes
In the C language, letters can be printed as their ASCII value (which is an integer). So there, something like this would print 65 for A.
User Vanegeek
by
8.2k points

No related questions found