logo CodeStepByStep logo

slash_figure_loop_table

Language/Type: Python basics for loops loop table

Suppose you are tasked with writing code to display the following text figure as output:

!!!!!!!!!!!!!!!!!!!!!!
\\!!!!!!!!!!!!!!!!!!//
\\\\!!!!!!!!!!!!!!////
\\\\\\!!!!!!!!!!//////
\\\\\\\\!!!!!!////////
\\\\\\\\\\!!//////////

Use the table to determine the expressions for the number of each type of character on each of the 6 lines in the following output.

Line \ ! /
1 0 22 0
2 2 18 2
3 4 14 4
4 6 10 6
5 8 6 8
6 10 2 10

Write your answers in the form A * line + B.

expression for \ and /
expression for !

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.