Write a Python code to implement the following If the last character in a 5-character string s is ’y’, then

computer science

Description

Problem 1: 

Write a Python code to implement the following

If the last character in a 5-character string s is ’y’, then 

1. change the ‘y’ to ‘i’ 

2. add ‘es ’ 

3. assign the result to a variable plural. Otherwise, just add ‘s’ and assign the result to a variable plural


Problem 2: 

Given a numerical test score between 0 and 100, print out the letter grade equivalent according to these rules: 

A 90-100 

B 80-89 

C 70-79 

U <70 


Problem 3: 

Write a program that display whether the value of x is in [L,R] or not X is inside the interval [L,R] if it is no smaller than L and no bigger than R. Hint: use input prompt function to read the values of x, L and R 

Instruction Files

Related Questions in computer science category