Practise joining strings, repeating them, comparing them and checking whether one string occurs inside another.
Six values are read from the standard input, one per line, in this order:
word1 — a stringword2 — a stringword3 — a stringsentence — a string that may contain spacesn1 — an integern2 — an integerAssign the following variables:
output1 (str) — word1 and word2 joined with a single space in betweenoutput2 (str) — the first four letters of word1 and the last four letters of word2, joined with a hyphen - in betweenoutput3 (str) — word3 and n1 joined with a single space in betweenoutput4 (str) — the hyphen - repeated 50 timesoutput5 (str) — the hyphen - repeated n2 timesoutput6 (str) — the digits of n1 repeated n2 timesare_all_words_equal (bool) — True if all three words are equalis_word1_comes_before_other_two (bool) — True if word1 comes before both word2 and word3 in string comparison orderhas_h (bool) — True if word1 contains the letter hends_with_a (bool) — True if word1 ends with a or Ahas_the_word_python (bool) — True if sentence contains python (lowercase)The input is read for you. Assign the answers to output1, output2, output3, output4, output5, output6, are_all_words_equal, is_word1_comes_before_other_two, has_h, ends_with_a, has_the_word_python.
You do not need to print anything — the values you assign to those names are what gets checked, in that order.
Input
Wingardium
Leviyosa
Silver
Learning python is fun
6
4
Output
'Wingardium Leviyosa'
'Wing-yosa'
'Silver 6'
'--------------------------------------------------'
'----'
'6666'
False
False
False
False
True