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
iragen [17]
3 years ago
8

Write a program that utilizes the concept of conditional execution, takes a string as input, and: prints the sentence "Yes - Spa

thiphyllum is the best plant ever!" to the screen if the inputted string is "Spathiphyllum" (upper-case) prints "No, I want a big Spathiphyllum!" if the inputted string is "spathiphyllum" (lower-case) prints "Spathiphyllum! Not [input]!" otherwise. Note: [input] is the string taken as input.
Computers and Technology
1 answer:
rodikova [14]3 years ago
4 0

Answer:

<em>Written in Python</em>

inputt = input()

if inputt == "SPATHIPHYLLUM":

     print("Yes - Spathiphyllum is the best plant ever!")

elif inputt == "spathiphyllum":

     print("No, I want a big Spathiphyllum!")

else:

     print("Spathiphyllum! Not"+ inputt+"!")

Explanation:

This line gets user input

inputt = input()

This line checks if input is uppercase SPATHIPHYLLUM and executes the corresponding print statement, if true

if inputt == "SPATHIPHYLLUM":

     print("Yes - Spathiphyllum is the best plant ever!")

This line checks if input is uppercase spathiphyllum and executes the corresponding print statement, if true

elif inputt == "spathiphyllum":

     print("No, I want a big Spathiphyllum!")

If user input is not upper or lower case of Spathiphyllum, the following if condition is considered

else:

     print("Spathiphyllum! Not"+ inputt+"!")

You might be interested in
Describe a sub routine​
Maksim231197 [3]

Explanation:

A routine or subroutine, also referred to as a function procedure and sub program is code called and executed anywhere in a program. FOr example a routine may be used to save a file or display the time.

4 0
3 years ago
Write a program to play an automated game of Rock, Paper, Scissors. Two players make one of three hand signals at the same time.
zhuklara [117]

Answer:https://www.chegg.com/homework-help/questions-and-answers/program-specifications-write-program-play-automated-game-rock-paper-scissors-two-players-m-q84530098

3 0
2 years ago
What impact does unemployment have on the economy?
Kazeer [188]

Answer:

<h2>A negative impact.</h2>

Explanation:

The unemployed are also unable to purchase as many goods, so will contribute to lower spending and lower output. A rise in unemployment can cause a negative multiplier effect.

8 0
3 years ago
Read 2 more answers
¿Como viaja la información? en la tecnologia
Simora [160]

Answer:

Todavía estoy aprendiendo español, por lo que las palabras podrían estar mal de alguna manera.

Explanation:

El seguimiento de vuelos, las agencias de viajes en línea y el uso de las redes sociales en línea son todas formas de tecnología de viajes que pueden ayudar a las personas a planificar viajes. La tecnología de viajes incluye sistemas de reserva por computadora, así como aplicaciones mucho más amplias que son cada vez más importantes.

6 0
3 years ago
Read 2 more answers
I have a real struggle when it comes to working with strings, whether they're arrays or pointers to strings, and I'm lost cause
neonofarm [45]
In C, you deal with a string always via a pointer. The pointer by itself will not allocate memory for you, so you'll have to take care of that.

When you write char* s = "Hello world"; s will point to a "Hello world" buffer compiled into your code, called a string literal.

If you want to make a copy of that string, you'll have to provide a buffer, either through a char array or a malloc'ed bit of memory:

char myCopy[100];
strcpy(myCopy, s);

or 

char *myCopy;
myCopy = (char*)malloc( strlen(s) + 1 );
strcpy(myCopy, s);

The malloc'ed memory will have to be returned to the runtime at some point, otherwise you have a memory leak. The char array will live on the stack, and will be automatically discarded.

Not sure what else to write here to help you...
6 0
3 years ago
Other questions:
  • A software program that enables users to find and display information stored as html pages on the internet is a(n) ____.
    5·1 answer
  • Charles sends Julia text messages every morning insulting her appearance and threatening to hurt her. He writes unflattering des
    5·2 answers
  • The computer component that makes sure that instructions are decoded and executed properly is the ___________.
    11·2 answers
  • Headphones are an example of _____.
    6·2 answers
  • In working on the conceptual design of the new database, Ken determines that the "office" field in one of the tables must includ
    8·1 answer
  • What are Important points to include about preventing the download of malware?
    14·1 answer
  • What does digital mean, in the term of computer science.
    11·1 answer
  • Which of the following tasks could be implemented as a filter using only a constant amount of memory (e.g., a couple of int or d
    8·1 answer
  • SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SUSSY SU
    6·2 answers
  • Which of the following is the key business objective behind the technologies implemented by PCL Construction, as discussed in th
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!