combine

py

School

Mesa Community College *

*We aren’t endorsed by this school

Course

156

Subject

Information Systems

Date

Dec 6, 2023

Type

py

Pages

1

Uploaded by Jo_Bird

Report
# Jodyleeann Kalulu # PA 2 # Prompt the user to enter three words word1 = input("Enter the first word (at least four letters): ") word2 = input("Enter the second word (at least four letters): ") word3 = input("Enter the third word (at least four letters): ") # Check if each word has at least four letters if len(word1) < 4 or len(word2) < 4 or len(word3) < 4: print("Each word should contain at least four letters.") else: # Combine the letters as specified combined = word1[:3] + word2[-2:] + word3[0] # Print the combined variable print("Combined variable: " + combined)
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help