0 of 7 questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
Your time:
Time has elapsed
Good work attempting the practice problems!
Please leave a comment below if you require any clarifications or send an email to [email protected] if you have any comments about this quiz.
You have completed this lesson!
Write a program to get the first name and last name from the user. Add “Brer” to these values, store them into one variable, and, then print it.
This response will be reviewed and graded after submission.
Consider the string “I’m writing in Python”. Write a python program to display the following substring “I’m writing”, by slicing it out from the given string.
This response will be reviewed and graded after submission.
Consider the two strings “All animals are equal, ” and “but some animals are more equal than others. – George Orwell, Animal Farm”. Write a program to put these two strings in two variables and to then concatenate them both.
This response will be reviewed and graded after submission.
Consider the string “2040-01-13 05:47:37.317 [P312][Error] AtlantaConnection: waitForConnection: timeout, no socket connected”.
Write a python program to check whether the given string contains the word “error”.
Note: The error word could be in upper or lower case. You need to perform a case insensitive check.
This response will be reviewed and graded after submission.
Write a python program to change all instances of the word “LogTrailing=off” to “LogTrailing=on” and “Device=off” to “Device=on” in the following string:
“””[Version]
Signature=$Windows NT$
Class=USB
LogTrailing=off
Device=off
ClassGUID={6D35E96F-E645-11CE-BFC1-34342BE10318}
Provider=%Provider%
CatalogFile=SynTP.cat
DriverVer=01/05/2040, 19.3.4.201″””
This response will be reviewed and graded after submission.
Write a program that accepts the user’s name and favorite number into variables. Can you guess what will be the type of these variables? Print the variable types of both.
This response will be reviewed and graded after submission.
Write a python program that takes the following string and splits it using the word “sometimes”. After splitting it into multiple pieces, print the second split piece.
“Sometimes you wake up. Sometimes the fall kills you. And sometimes, when you fall, you fly.” – Neil Gaiman, The Sandman
Hint: Note that sometimes appears in both upper case as well as lower case. Before splitting you must ensure lower case.
This response will be reviewed and graded after submission.