Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello tutor I need help with my CSE 101 Lab #2 questions 1. It involves using python. I use pycharm myself. CSE 101: Introduction to

Hello tutor I need help with my CSE 101 Lab #2

image text in transcribed

questions 1. It involves using python. I use pycharm myself.

CSE 101: Introduction to Computers (Baction 01) Fal 2017 Laboratory Assignment 2 This assignment is due by 11 59 PM on Friday, September 22. Submit your py tles through Blactboard You may submit an unlimited number of times; we will only grade the last submission that you make, bur please be sure to attach ALL of your py source code files to each submission atempt. Be sure to Include your name and SBU ID number in a Python comment at the top of each file that you submit In today's lab, you will develop two small Python programs that work with strings, lists, and tor loops 1. A Simple Auto-Responder (5 points) Define a Python function named get Response) that takes a string as ts only argument and returns a new string it the argument ends with a question mark and has an even rumber of characters the function should returm the string "Yes" H the argument ends with a question mark and contains an odd number of characters, the function should retum the string No It the argument ends with an exclamation point, the function should return the string "Wow. Otherwise, the function should return the string You always say tollowed by the argument Hint: the "Python Programming Fundamertals" lecture slides contain several charts listing a number of string operations that can dramatically simplity this for you Sample Input Is it raining? s snow cold? That cat is huge Java is fun Expected Output Yes No Wow You always say Java is fun Complete your program by adding some Python statements (outside of and atter yout function definition) that read a message from the user, pass it to getResponse(), and print the result

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

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions

Question

True or False? The Linux dmesg command enables you to view a log .

Answered: 1 week ago