Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer in python as soon as possible. Thank you OBJECTIVES: i. To understand logical and relational operators ii. To test conditions to see if

image text in transcribed
please answer in python as soon as possible.
Thank you
OBJECTIVES: i. To understand logical and relational operators ii. To test conditions to see if they are True or False iii. To use simple decision structures (if-else) in a program 1. Write a Python program (with comments) to do the following: a. Ask the user to enter their last name. The user may enter their name using either lowercase or uppercase letters, or a combination of both. Save the last name in a variable name, as a str whose 1" letter is capitalized, and all other letters are lowercase. Print the saved name. b. If name contains only alphabetic characters, print "Your name contains only alphabetic characters.' c. Otherwise, print 'Your name contains non-alphabetic character(s).' d. If name contains the str 'ae' print 'Your name contains "ae".' e. Otherwise, if name contains the str 'be' print 'Your name contains "be".' f. Otherwise print the number of characters in name, with a suitable message. g. Save your code to a file with name lab5sol.py. h. Submit your Python code (i.c. lab5sol.py file) through BB. A sample session is shown below

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

Find the vertex of each parabola. f(x) = x + 8x + 10

Answered: 1 week ago