Tuesday, 1 February 2022
Python practice programs for beginners - Day6
Welcome to the 30-day challenge of Python practising for beginners.
Day 5 practice program:
Practice all the Arithmetic Operators given:
Arithemtic Operators:
Addition --> +
Subtraction --> -
Multiplication --> *
Division (Quotient) --> /
Division (Remainder) --> %
Exponentiation --> **
Floor Division --> //
Program:
Day 6:
Formatting:
In the above output, you can see the output are getting displayed but it is not that clear to the user.
So we will use String formatting.
Syntax:
print(f'yout text {your variable}')
Example:
Try to apply the formatting to all the other arithmetic operators.
Try to complete the task.
The output will be displayed in the next post.
Subscribe to:
Post Comments
(
Atom
)
👍nice. all the best
ReplyDelete