Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python Let's play with the stars 1) Write a program that asks the user to enter a number n and displays a row of n

image text in transcribedpython
image text in transcribed
Let's play with the stars 1) Write a program that asks the user to enter a number n and displays a row of n stars side by side 2) Write a program that asks a user to enter a number n and displays a column of n stars 3) Write a program that asks a user to enter a number n and displays a square full of n stars 4) Write a program that asks a user to enter a number n and displays a hollow square of n stars 5) Write a program that asks a user to enter a number n and displays a hollow square of n stars, we will put + on its diagonals The pyramids 1) Write a program that asks the user to enter a number n and displays (with stars) an isosceles right triangle of n stars high/ wide with the right angle in bottom right 2) The same but with the right angle at the bottom left 3) Combine these two programs to make a pyramid of height n and base 2n-1 Ruler 1) Write a program that asks a user to enter a number n and displays a rule start of size n. Example for n = 12:I---------- 2) Modify this program to ask for two numbers n and k and display a rule of length n graduated from k tok. Example for n= 12, k = 3:1-1-1-1-1 Chifoumi, Stone, Paper, Scissors, Lizard, Spock We want to make a program that allows you to play rock, paper, scissors (Each player chooses one of the three, and wins if he chooses the one who beats the choice of the other. Scissors> Paper Stone> Scissors) Write an algorithm that chooses a number at random between 1 and 3 and associates the corresponding sign. (Scissors 1, Paper 2, Stone 3) Now ask the user to enter a number and do the same Show machine choice, user choice and say who won. Repeat the game until one of the players (human or machine) reaches a score 3, and display the winner. A variation of the game is to add 2 other symbols, Lizard and Spock. The paytable then becomes: Pierre bat: Scissors and Lizard Paper bat: Pierre and Spock Scissors bat: Paper and Lizard Lizard bat: Paper and Spock Spock beats: Stone and Scissors Modify your previous program to allow this variation to be played. There are many other variations. As long as there are 2n + 1 possibilities, we can place them on a circle, say that for each value it beats the next n and loses against the previous n, and the game remains balanced

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions