Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Write a program called ezstart.py that: a. In a comment on the first line gives your full name (first and last). b. Creates a string

  1. Write a program called ezstart.py that: 

  2. a. In a comment on the first line gives your full name (first and last). b. Creates a string variable called myname that's equal to your name. c. Creates an integer variable called myage that's equal to your age. d. Creates a float variable called sqrage that's equal to the square root of the myage variable (calculate this value in Python by referencing the myage variable). e. Then, using placeholders, outputs "My name is [myname], and I am [myage] years old." (Use placeholders in the place of the bracketed terms.) f. Finally, in a separate command and using a placeholder, outputs "The square root of my age is [sqrage]." (Use the placeholder in the place of the bracketed term.) 

  3. 2. Write a program called muchmath.py that: 

  4. a. Includes your name as a comment on the first line of code. 

  5. b. Asks the user to input to different integer values, a and b. 

  6. c. Convert both a and b into integer variables. 

  7. d. Then, using placeholders, outputs: the sum of the two values (a plus b), the difference (a minus b), the product (a times b), the quotient (a divided by b), the remainder when a is divided by b, and a raised to the power of b. e. These outputs should show the entire equation as well as the result. 

  8. i. For example, if a is 5 and b is 8, the output for the sum should read "5 + 8 = 13". 

  9. ii. For the "remainder", just use the letter R. 

  10. iii. Again, use placeholders for these outputs. 

  11. 3. Write a program called aniguess.py that: 

  12. a. In a comment on the first line gives your full name (first and last). 

  13. b. Creates a variable called atype equal to the value "bird". 

  14. c. Asks the user to guess what type of animal the program is thinking of and assigns the user's input to the variable uguess. 

  15. d. Includes an if-statement in which... (Hint: You should use both elif and else.) 

  16. i. If the value of uguess is equal to the value of atype, congratulates the user on an excellent guess.

  17.  ii. Otherwise, if the value of uguess is "meteor", tells the user that what they've guessed isn't an animal. 

  18. iii. Otherwise, if the value of uguess has the same number of characters in it as the value of atype, congratulate the user on guessing something with the right number of letters. iv. Finally, if none of the above are true, tells the user (on one line, using placeholders) that the actual animal isn't [whatever they guessed], but, instead, it's [value of atype].

  19.  4. Write a program called astory.py that: a. Includes your name as a comment on the first line of code. b. Asks the user for a series of inputs: i. A first name. ii. A verb. iii. A small object. iv. An adverb. v. A body of water. c. Prints out (all on one line, using placeholders) the following one-sentence "story": i. "[First Name] felt threatened by the [small object], and, thus, decided to [verb] [adverb] into [body of water]." 

  20. 5. Write a program called guessnum.py that: a. In a comment on the first line gives your full name (first and last). b. Assigns the value of your age to the variable myage. c. Asks the user to guess integers until the user guesses the value of myage. d. Each time the user guesses a value, convert the inputted value into an integer (assume the user will only input integers). i. Compare the user's guess to the value of myage. ii. If the guess is incorrect, tells the user whether the guessed integer is too high or too low and then asks the user to input another guess. iii. If the guess is correct, congratulates the user and tells the user how many attempts it took for them to guess correctly. 

  21. 6. Write a program called ctdown.py that... a. In a comment on the first line gives your full name (first and last). b. Asks the user to enter a large integer value and assigns this to a variable called startpt. c. Converts startpt into an integer. d. Asks the user to enter a much smaller integer value and assigns this to a variable called increm. e. Converts increm into an integer. f. Otherwise, use a while loop to "count down" from the startpt variable by subtracting the value of increm until it reaches (or goes below) 0. ( g. Each time through the loop, outputs the new value. h. When the value reaches (or goes below) 0, tells the user that the countdown is over and that it's time to move on (the program ends). 

  22. 7. Write a program called sumitall.py that... 

  23. a. In a comment on the first line gives your full name (first and last).

  24. b. Asks the user how many integers they would like to sum and assigns this value to the variable numcount.

  25. c. Converts numcount into an integer. 

  26. d. If numcount is less than one, the program should tell the user that what they're trying to do is impossible. The program should then quit. 

  27. e. Otherwise, the program should ask the user to input the numcount number of integers (i.e., if numcount is 3, then the user should input three integers). 

  28. i. Each time the user enters a value, the program should convert the user's entry into an integer. 

  29. ii. Also after each entry, the program should tell them, in a sentence and using a placeholder, how many integers they still need to enter (e.g., "You have 7 entries left."). 

  30. f. Once the user has entered all the integers, the program should tell the user, in a sentence and using placeholders, "The sum of your [numcount] values is [sum].", with placeholders taking place of the bracketed terms.

Step by Step Solution

3.56 Rating (153 Votes )

There are 3 Steps involved in it

Step: 1

Lets start with each program one by one ezstartpy Your full name Your Name myname Your Name myage 30 Replace with your actual age sqrage myage 05 printMy name is and I am years oldformatmyname myage p... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students explore these related Programming questions

Question

What are the application procedures?

Answered: 3 weeks ago