Question: Write a Python program that: String printing and basic manipulation. At least one string that: prints a new line prints a tab uses the escape

Write a Python program that:

  1. String printing and basic manipulation. At least one string that:
    1. prints a new line
    2. prints a tab
    3. uses the escape character to print the single quote (') character.
    4. uses the escape character to print the double quote (") character.
    5. uses the escape character to print the backslash (\) character.
    6. uses multiple lines for one print function
  2. Data Types and Variables printing and basic manipulation.
    1. prints the result of a long integer operation
    2. prints a value in the following:
      1. decimal,
      2. octal,
      3. hex, and
      4. binary
    3. prints the lower-case a character in ASCII and Hex values of the "lower case a" character
    4. assigns values to variables a and b
      1. reassign the value of a to equal the value of b
    5. uses unary operators:
      1. positive for the variable a
      2. negative for the variable b
    6. uses basic use of:
      1. modulus (%)
      2. exponentiation (**)
Write a Python program that: String printing and basic manipulation. At least

1 # Sample Program #1 2 #printing a string with white space 3 print "Hello world! " 4 #printing the result of Long integer operation 5 print(123123123123123123123123123123123123123123123123 + 1) 6 #printing a value in decimal, octal, hex, and binary 7 print(10) 8 print(2010) 9 print(ex10) 10 print(@b10) 11 #using the escape character to print symbols in a string 12 print('This string contains a single quote (\) character.') 13 print("This string contains a double quote (\") character.") 14 #continuing a print of string in multiple lines 15 print('al 16 \ 17 18 #using the escape character and more white space 19 print('fool\bar') 20 print('foo\tbar') 21 #using the ASCII and Hex values of the "Lower case a" character 22 print("a\141\x61") 23 #assigning values to variables a = 4 25 b = 3 26 #reassigning a value to the variable a 27 a-b 28 #using unary operators 29 30-b 31 #using basic and not-50-simple math operators 32 print(a % b) 33 print(a ** b) 24 ta

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!