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
DiKsa [7]
2 years ago
6

Write an expression that prints 'You must be rich!' if the variables young and famous are both True.

Computers and Technology
1 answer:
Rufina [12.5K]2 years ago
4 0

Answer:

Following are the expression to this question:

if (young and famous==True):

Explanation:

For print, the given expression the code requires some modification that can be defined as follows:

young = True#defining a bool variable that holds a value True

famous = True#defining a bool variable that holds a value True

if (young and famous==True):#defining if block that check variable value

   print('You must be rich!')#print message

else:#else block  

   print('There is always the lottery...')#print message

Output:

You must be rich!

Code explanation:

In the above-given code, two variable "young and famous" is declared, that hold a "True" which is a bool value, in this code, a conditional statement has used, that checks variable value, which can be defined as follows:

  • In the if block, it uses the above declared variable with and gate to check its value is equal to true.
  • If the condition is true, it will print the true block message, otherwise, go to the else block in this, it will print the else block message.
You might be interested in
Three variables, x, y and z, supposedly hold strings of digits, suitable for converting to integers. Write code that converts th
Gelneren [198K]
The answer is 45boobg
3 0
3 years ago
Read 2 more answers
Dr. Joon asks her students how to insert a table in an Excel workbook. The students record the steps a chart. Which students lis
Leona [35]

Answer:

C

Explanation:

Both Table and Format as Table can be used to create a table

4 0
3 years ago
Write a loop that reads strings from standard input where the string is either "land", "air", or "water". The loop terminates wh
____ [38]

Answer:

count_land = count_air = count_water = 0

while True:

   s = input("Enter a string: ")

   if s == "xxxxx":

       break

   else:

       if s == "land":

           count_land += 1

       elif s == "air":

           count_air += 1

       elif s == "water":

           count_water += 1

print("land: " + str(count_land))

print("air: " + str(count_air))

print("water: " + str(count_water))

Explanation:

*The code is in Python

Initialize the variables

Create a while loop that iterates until a specific condition is met. Inside the loop, ask the user to enter the string. If it is "xxxxx", stop the loop. Otherwise, check if it is "land", "air", or "water". If it is one of the given strings, increment its counter by 1

When the loop is done, print the number of strings entered in the required format

4 0
3 years ago
Give any 3 examples of mainframe computers .
Eddi Din [679]
3 Examples of mainframe computers
z900
System z9
System z10
5 0
3 years ago
What tool might be used by an attacker during the reconnaissance phase of an attack to glean information about domain registrati
Soloha48 [4]

A tool which might be used by an attacker during the reconnaissance phase of an attack to glean information about domain registrations is: Whois.

<h3>What is a DNS server?</h3>

A DNS server can be defined as a type of server that is designed and developed to translate domain names into IP addresses, so as to allow end users access websites and other internet resources through a web browser.

This ultimately implies that, a DNS server refers to a type of server that translate requests for domain names into IP addresses.

In this context, we can infer and logically deduce that Whois is a tool which might be used by an attacker during the reconnaissance phase of an attack to glean information about domain registrations.

Read more on a domain names here: brainly.com/question/19268299

#SPJ1

4 0
1 year ago
Other questions:
  • when seeking information on the on the internet about a variety of subjects the most useful place to look would be?
    13·1 answer
  • What is safe mode?
    9·1 answer
  • On a Linux system, which command allows you to modify settings used by the built-in packet filtering firewall?
    15·1 answer
  • This is a text message that is stored on a user's computer by a Web server that helps trace the user's browsing habits. a. Scrip
    14·1 answer
  • There are two main advantages to using multiple threads in a process: 1) Less work involved in creating a new thread rather than
    7·1 answer
  • When you expand the virtual size of a game, what do you create?
    7·1 answer
  • 2ND LAST QUESTION
    13·1 answer
  • You are critiquing a logo design that one of your coworkers proposed. Your sense is that the individual elements of the design a
    10·1 answer
  • What is the value of the variable named result after the following code executes?
    10·1 answer
  • Describe your ideas for a keyboarding game that would help someone improve their skills.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!