← Back to Dashboard

Introduction Basic Syntax: Medium Exercises MEDIUM

"""
Topic 01: Introduction & Basic Syntax - MEDIUM Exercises (10)

These exercises require a bit more thinking and use of some built-in features.
"""

# Exercise 1: Use the help() function to find out what the 'end' parameter does in print().
# Then, print two different strings on the same line without a space between them using 'end'.
# Write your code below:


# Exercise 2: Print the following exact structure using only ONE print statement:
# Number 1
#   Number 2
#     Number 3
# Write your code below:


# Exercise 3: Calculate the area of a rectangle with length 12 and width 7. 
# Print the result using a formatted string: "The area of the rectangle is: [result]"
# Write your code below:


# Exercise 4: Print the current version of Python you are using.
# Hint: You might need to import the 'sys' module and use 'sys.version'.
# Write your code below:


# Exercise 5: Create a "Artistik" signature using characters like |, _, \, /.
# Example:
#   / \
#  | o |
#   \ /
# Write your code below:


# Exercise 6: Print a string that contains both single quotes (') and double quotes (") without using escape characters.
# Hint: Python allows both types of quotes to define strings.
# Write your code below:


# Exercise 7: Print the result of 2 to the power of 10.
# Write your code below:


# Exercise 8: Use the print function to show the result of a Boolean comparison (e.g., is 10 greater than 5?).
# Write your code below:


# Exercise 9: Print the first 5 multiples of 7 on a single line, separated by a comma and a space.
# Write your code below:


# Exercise 10: Print the word "ERROR" in all caps, and on the next line print it again but indented by 4 spaces.
# Write your code below: