Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is for my Python class! Instructions 0. Rename this file yourName_lab2. Not literally, yourName_lab2 (technically correct, the best kind of correct!) but use your
This is for my Python class!
Instructions 0. Rename this file yourName_lab2. Not literally, yourName_lab2 (technically correct, the best kind of correct!) but use your BU ID to fill in yourName 1. Read all instructions carefully, ask questions if anything is confusing 2. Fill in the code/text blocks to answer each question 3. Do not change any of the existing code provided. The code is specifically there to help you! 4. Run the entire notebook before submitting it on Sakai to make sure that the code actually runs without errors 5. Important: Any question for which your code fails to run will receive 0 points 6. Have fun! 7. Extra credit (if applicable) will only be granted if this lab is turned in before the end of class 8. Do not import any packages! Any packages available to you are designed to be used from their import statement down. Example: Problem 1 doesn't have any import statements. Problem 2 imports one package called "". Problem 3 imports one package called "B". You may not use "A" or "B" for problem 1, you may not use "B" for problem 2 and you may use both for problem 3. If you were to restart and rerun all cells in your notebook you would not be able to use a package prior to importing it so it logically makes sense as well! Problem #1 (20 points+3 optional points of extra credit if turned in by the end of class submitted on sakai) supplied is returned as a string! First take in a user string input prompting them for their first name Print the following: Welcome to CS 497 Python Programming, their_name! Extra credit version: (let's not consider y a vowel for this assignment) If their name starts with a vowel print: Welcome to CS 497 Python Programming, their_name! If it doesn't start with a vowel print: their_name, Welcome to CS 497 Python Programming! their-name ### Write your code here In [ ] : input("Please enter your first name ") = Problem #2 (30 points) Finding the sum of an increasing sequence of integers starting from 1 First take a positive integer user input upper_bound and use that is the upper bound. If the user foolishly enters a negative number, print "you fool!" and proceed to multiply the offending number by negative one to right their misdeed and then perform the calculation. Use any loop to compute i. Please output the result. For example: , i-1+2+3+4+5-15 In [ J: user_entry_string input("Please a positive upper bound for the summation InIn") ##we need to turn the string into a int to use it in this summation above! user_entry_int - int(user_entry_string) ### Write your code here Problem #3 (50 points) "A pangram, or holoalphabetic sentence, is a sentence that contains every letter of the alphabet at least once. The most famous pangram is probably the thirty-five-letter-long "The quick brown fox jumps over the lazy dog," which has been used to test typing equipment since at least the late 1800s." You may not use any string functions other than lower), you will need to be careful and use chr() and ord() to work this problem out http//www.ascitable.com/ "Sphinx of black quartz, judge my vow True! "Sphinx of black quartz, judge my bow This is false, I changed the "vow" to "bow" and we are missing a v First make the sentence lowercase, then proceed to check if the sentence is a pangram Note: there are many ways to do this problem. Think of a reasonable way to solve it, and work with that In sentence "Sphinx of black quartz, judge my vow" result -False ##Your code goes here print (sentence,"is a pangram?",result)Step 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