Each of these files MUST be in a separate file (sorry).
Please make sure the top of each program includes:
Code MUST have a header section showing name and date
All tasks MUST BE SEPARATED in both your code and output. I should VERY Easily be able to scan your code and see each activity. I should also be able to run your program and see each activity clearly in the output!!
If you use things like colors, text decorations, unicode, and extra methods / things we've learned in class, you'll be awarded bonus points for each task you use them on.
All Unicode must be show like \UXXXXXXXX - Do not paste in the actual character
ALL Color strings must be DEFINED as STRING CONSTANTS
An extra 2 points per program will be awarded if you print what program it is before it runs. I've included an example below:
You will have the entire block, plus possibly 20 minutes next class to complete the quiz. After that, if not submitted, you will lose 10% per day late
Ask a user for something they'd like to tell someone
Assign the Message to a Variable and then print that message in at least 4 different ways
fStrings, placeholders, standard print, comma print, etc...
Each way you print it, you must tell the user (with a message) how it's being printed
I've included an example
Have a user input a message and assign it to a variable
Print the message.
Prompt the user for a new message and change the value of the variable to be the new message
Print the new message.
NOTE: You should ONLY have 1 variable!!!
Prompt a user to enter their name.
Print a message to that person.
NOTE: Your message should be simple such as, "Hello Eric, would you like to play a game?"
Prompt a user to enter a name
Using String Functions, print that name out in upper, lower, and title case
Make sure to tell the user what you're printing their name as
NOTE: It MUST be formatted like shown!!!
Prompt a person to enter a famous quote and it's author/speaker
Print the quote and the name of the author.
Your output should look like the following (your quote MUST be in quotes):
Albert Einstein Once Said, "A Person who never made a mistake never tried anything new"
Repeat the last exercise, but
store the persons name in a variable called famous_person.
store the quote in a variable called message.
Print as follows:
"A Person who never made a mistake never tried anything new"
~ Albert Einstein
Create a variable called uname1 = " SOME NAME GOES HERE "
Create a variable called uname2 = "\t\tSOME NAME HERE\t\t"
Print so the whitespace is displayed
Now, print it using each of the 3 functions lstrip(), rstrip() and strip()
This must be printed nicely!!!
NOTE: I've shown you 2 possible ways to output this. Pick one of these, or another well formatted output
Prompt a user to enter a string with leading and trailing whitespace
print the string as it was entered
remove all whitespace using string methods
print the new string
Assign the value 'c:\Windows\Users\root\python_notes.txt' to a variable called filename
Prompt a user to enter a file path like shown above. You can even use that to show the user what needs to be printed. Tell them it MUST be located in c:\Windows\Users\root
If you don't, this assignment is a LOT Harder, and you don't know how to do it yet!!
use whatever appropriate string methods you need to display the file name only for BOTH strings
Create a new file called website_strings.py
Prompt a user to add at least 3 names of websites and store them in variables. Example below:
website_one = "http://www.amazon.com"
website_two = "http://www.google.com"
website_three = "http://www.sweetwater.com"
Using your string functions, you need to Figure out a way to print the website names as follows:
Display Method 1:
Display Method 2:
Convert the following for a user:
Prompt for number of days, and convert it to number of minutes
Prompt a user for number of meters, and convert it to feet
Prompt a user to enter a number of donuts (Between 12 and 15 - don't worry about error checking yet) and:
Display that number of unicode donuts in no more than 12 per line
Output how many donuts the user asked for
Do this all in a table
Note... You do NOT need to worry about the donut unicode rows being lined up nicely. However, if you can get them to, I'll award bonus!!
Just so you know: 1 unicode character = 2 text character spaces