I’m not sure if this is the place i can extrapolate my problem (just joined the site) so here it is.
As you can see I’ve just started a BA of IT in Games Design and Development this im my first coding Assignment and it’s gotta be by tomorrow night which would be fine except for mainly the whole finding the “E”(can do that) but it’s putting it into a sentence and replying True or False.
This is the code I’ve got so far:-
print("ZAT113 Programming Principles Task 1") # Printing 'ZAT113 Programming Princpiles Task 1' to the screen.
# Ian Murray 709001 # Creating a comment line with name and student number
favourite_colour = "blue" # Creating variable called favoriate_colour
print (favourite_colour) # Printing the variable for mt favoriate colour
number_units = 3 # Create a variable for the number of units I'm enroled in semester 1
print(number_units)
first_name = input("What's your first name: ") # Creating 2 variables, first_name and last_name
last_name = input("Whats's your last name: ") # using the input funtion to collect the values using user prompts
print(last_name.upper()) # Using a String method to print out a string variable in uppercase
print(len(first_name)) # Number of characters in first name
welcome_message = f'Welcome {first_name.upper()} {last_name.upper()} to our little python session. ' # Setting the variable fprint embeded
print(welcome_message)
print(first_name[1:3])
print(last_name[4:6])
From this point i need code to find if the letter ‘E’ or’ e’ is in the variable first_name (upper or lower case) and get a True or False value ‘Boolean’ at the end of the sentence in the var=welcome_message.
After that i need to add another input asking for their height in cm then output that to sentence saying “You are 1.6 meters tall,” so by dividing the 160.eg by 100 by using a. fstring format
Screenshot of IDLE Python
Thanks everyone for and help you can give.
I’ve got no doubt there’s probably thousands of people here that could spit it out in a few minutes lol
Cheers
Ian