1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Makovka662 [10]
1 year ago
10

Create a program that prompts the user for a positive integer then prints a right-aligned pyramid using that number using the st

ructure below
Here are some examples:

> Enter an integer between 1 and 5: 2
1
2 3
> Enter an integer between 1 and 5: 5
1
2 3
3 4 5
4 5 6 7
5 6 7 8 9

> Enter an integer between 1 and 5: -3.4
That's not an integer between 1 and 5.
Computers and Technology
1 answer:
Makovka662 [10]1 year ago
3 0

Below is the program that prompts the user for a positive integer then prints a right-aligned pyramid in python programming language.

rows = int(input("Enter number of rows: "))  

for i1 in range(1, rows):  

   for j1 in range(1, i1 + 1):  

       # This prints multiplication / row-column  

       print(i1 * j1, end='  ')  

   print()  

What is Python in programming?

Python is a interpreted, high-level programming, object-oriented, language with a dynamic semantics. Its high-level built-in data structures, combined with dynamic typing and dynamic binding, make it very appealing for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.

Python's simple, easy-to-learn syntax emphasizes readability, lowering the cost of program maintenance. Python also supports modules as well as packages, which promotes program's modularity and reuse of code. The Python interpreter and extensive standard library are freely distributable and available in source or binary form for all major platforms.

To learn more about Python, visit: brainly.com/question/28379867

#SPJ1

You might be interested in
A sum amounts to ₹2400 at 15% simple interest per annum after 4 years fond the sum.​
Elis [28]

Answer: $1,500

Explanation:

The future value of value using simple interest is:

Future value = Value * ( 1 + rate * time)

2,400 = Value * (1 + 15% * 4)

2,400 = Value * 1.6

Value = 2,400 / 1.6

Value = $1,500

6 0
3 years ago
Write a valid HTML + Python page that will count numbered from 1 to 1,000,000?​
valentinak56 [21]

Answer:

I remember before the corona virus we used to do math at school

8 0
3 years ago
Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minu
Anarel [89]

Answer:

mport java.util.Scanner;

public class CellPhoneService

{

    public static void main (String args[])

    {

         Scanner sc=new Scanner(System.in);

         System.out.println("Enter the Talk minutes");

         int talkmin=sc.nextInt();

         System.out.println("Enter the text message");

         int textmsg=sc.nextInt();

         System.out.println("Enter the Gigabyte Data");

         int gbdata=sc.nextInt();

         if(talkmin<500 && textmsg==0 && gbdata==0)

         System.out.println("PLAN A IS RECOMMENDED FOR THIS USER at 49$ per month");

         else if(talkmin<500 && textmsg>0 && gbdata==0)

         {

              System.out.println("PLAN B IS RECOMMENDED FOR THIS USER at 55$ permonth");

         }

         else if(talkmin>=500 && textmsg<100 && gbdata==0)

         {

              System.out.println("PLAN C IS RECOMMENDED FOR THIS USER at 61$ permonth");

         }

         else if(talkmin>=500 && textmsg>=100 && gbdata==0)

         {

              System.out.println("PLAN D IS RECOMMENDED FOR THIS USER at 70$ permonth");

         }

         else if(gbdata>0 && gbdata<2)

         {

              System.out.println("PLAN E IS RECOMMENDED FOR THIS USER at 79$ permonth");

         }

         else if(gbdata>=2)

         {

              System.out.println("PLAN F IS RECOMMENDED FOR THIS USER at 87$ permonth");

         }

    }

}

Explanation:

  • Take the talk minute and text message as input from user.  
  • Apply the conditional statement to check if talk minute is less than 500 along with text message and GB data having a value 0.
  • At last check if GB data is greater than or equal to 2, then print the relevant response.
3 0
3 years ago
X = 1 if (A = 1 OR B = 1) OR (A = 0 AND B = 1
Gnoma [55]

Answer:

For question a, it simplifies.  If you re-express it in boolean algebra, you get:

(a + b) + (!a + b)

= a + !a + b

= b

So you can simplify that circuit to just:

x = 1 if b = 1

(edit: or rather, x = b)

For question b, let's try it:

(!a!b)(!b + c)

= !a!b + !a!bc

= !a!b(1 + c)

= !a!b

So that one can be simplified to

a = 0 and b = 0

I have no good means of drawing them here, but hopefully the simplification helped!

4 0
3 years ago
Greg works for an online games development company. He is not a net freak, but occasionally he visits online literature sites an
sweet-ann [11.9K]

Answer:

i think its A

Explanation:i hope i helped

5 0
3 years ago
Other questions:
  • You want to register the domain name ABCcompany.org, but the registration service is not allowing you to do that. What's the mos
    10·1 answer
  • Select one of the following strategies: active listening, sandwich technique, constructive feedback. in 2-5 paragraphs, define a
    11·1 answer
  • When Web users enter the URL www.CIWcertified.com in their browser address bar, they can access the official CIW Web site at the
    6·2 answers
  • Sorting table rows is based on the data in the selected        A. cell range.   B. cell.   C. column.   D. row.
    12·2 answers
  • How to get the home button on your screen?
    13·1 answer
  • Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2
    14·1 answer
  • Do you think lossy compression formats will be popular in 20 years? Why or why not?
    10·1 answer
  • Write a loop that continually asks the user what pets the user has until the user enters rock in which case the loop ends. It sh
    6·1 answer
  • Which are the top 10 Popular Cars and Video Games get max ammount of point that we can give​
    12·2 answers
  • Why does python code generate fewer types of syntax errors than code in other programming languages?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!