Answered step by step
Verified Expert Solution
Question
1 Approved Answer
THIS IS IN PYTHON! PLEASE ANSWER IN PYTHON Question 10: 4 points Enter and execute the following code l |numString - input (Enter a number:
THIS IS IN PYTHON! PLEASE ANSWER IN PYTHON
Question 10: 4 points Enter and execute the following code l |numString - input ("Enter a number: ") 2 if numString. isdigit (): 3num int (numString) 4print (num, "to the fourth power is" num**4) 5 else: 6 print("Your input is not a valid number.") print ("Program terminated!") (a) (2 points) Execute the program with at least five different types of input. Examine the output for each input. What does the program do? b) (2 points) What does the isdigit() function do? 2.2 Application Questions Use the Python Interpreter to check your work. Question 11 10 points Download the following book from Project Gutenberg. File 1404.txt from http://www.gutenberg.org/files/1404/ Write a program that prints out every number in the file. Look at every line, then split into words. Print out any word where isdigit returns true. At the end of the program, print the total number of numbers found in the fileStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started