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
inna [77]
3 years ago
10

Assuming the user enters integers, how many times will the following program print hi x = int(input()) y = int(input()) if x &gt

; 0 or y > 0: print("hi") if x <= 0 and y <= 0: print("hi")
Computers and Technology
1 answer:
raketka [301]3 years ago
3 0

Answer:

It prints "hi" only one time.

Explanation:

It will print the result depending on the if statements. If you look at the if statements, you will see that no matter you enter it is going to be either true for the first if statement or for the second if statement.

Let's say you entered 1 for x and 0 for y, first if statement will print hi, but the second one will not print because x is not smaller or greater than 0.

Let's say you entered 0 for x and 6 for y, second if statement will print hi, but the first one will not print because x is not greater than 0.

You might be interested in
100 POINTS FOR ANYONE WHO CAN DO THIS!
Nataly [62]

Let's check what can be modified

Before calling def we need adjective and conjunctions stored inside variables

Store them(You may change according to your choice)

\tt adjectives=("foolish","bad","long","hard")

\tt conjunctions=("and","but","for","after")

We have to make optional ,easy way ask the user to do instead of yourself .

\tt con=input("Enter\: yes\: if \:you \:want \:to \:use \:conjunctions:")

\tt adj=input("Enter\:yes\:if\:you\:want\:to\:use\: adjectives:")

If they click then we can proceed else no problem let the program run

\tt def\: conjunctionPhrase():

\quad\tt if\: con=="yes":

\quad\quad\tt return\:random.choice(conjunctions)+"\:"+nounPhrase()

\quad\tt else:

\quad\quad\tt continue

  • You may use pass also

\tt def\: adjectivePhrase():

\quad\tt if\:adj=="yes":

\quad\quad\tt return\:random.choice(adjectives)+"\:"+nounPhrase()

\quad\tt else:

\quad\quad\tt continue

4 0
2 years ago
A social media site violates its terms of service by selling information about its users
balu736 [363]
A company violating its terms of service by selling their user’s info is a violation of Digital Privacy
4 0
3 years ago
________ is the information about a file.
GalinKa [24]
Properties is the information about the file
4 0
3 years ago
I have a question about this programming assignment. The outcome when the user puts in Taylor for guest one and Fernando for gue
ivolga24 [154]
Yes u need more brackets
4 0
3 years ago
Read 2 more answers
I'll mark you the brainlest please help
nikklg [1K]

Hello There!

<u>ANSWER:</u>

<u></u>

C.

Hopefully, this helps you!!

AnimeVines

3 0
3 years ago
Read 2 more answers
Other questions:
  • 50 Points! 25 Points Each! Please help ASAP! Will mark brainliest! See attached image.
    10·2 answers
  • A(n) __________attack is designed to render the target unreachable by legitimate users, not to provide the attacker access to th
    8·1 answer
  • Which of the following documents should beprepared before the commencement of a softwareproject?
    9·1 answer
  • Higher-speed Ethernet technologies use an electronic device known as a Hub rather than a switch True/False
    15·1 answer
  • Software is nothing but a piece of code or set of instructions written in a chip to run a hardware device on the Computer. O Tru
    14·1 answer
  • Write a Java program in jGRASP that creates a 2D integer array of 5 rows and 20 columns, fills it with increasing integer values
    13·1 answer
  • Instructions:Type the correct answer in the box. Spell all words correctly.
    9·2 answers
  • What is the benefit of hosting a website on a personali
    6·1 answer
  • 1 Which one of the following is a transmission
    9·1 answer
  • Which code snippet is the correct way to rewrite this in Semantic HTML?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!