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
DedPeter [7]
3 years ago
5

Complete the expression so that user_points is assigned with 0 if user_items is greater than 25 (second branch). Otherwise, user

_points is assigned with 10 (first branch).
user_level = int(input()) # Program will be tested with values: 15, 20, 25, 30, 35.

if ''' Your code goes here ''':
user_points = 10
else:
user_points = 0

print(user_points)

What is the answer for Python please.
Computers and Technology
1 answer:
Tju [1.3M]3 years ago
7 0
This a similar question but just that its greater then 30 seconds.
You might be interested in
Sentence Deobfuscate Name this file deobfuscate.cpp Hints: Don’t overthink this problem. Prompt the user to enter a collection o
nordsb [41]

Answer:

In C++:

#include <iostream>

using namespace std;

int main(){

   string text,lengt;

   cout<<"Please enter obfuscated sentence: ";    cin>>text;

   cout<<"Please enter deobfuscation details: ";    cin>>lengt;

   string t1, t2;

   int kount = 0;

   for(int i = 0;i<lengt.length();i++){

   kount+=(int)(lengt[i]-'0');

   t1 = text.substr(0, kount);

   t2 = text.substr(kount, text.length()-1);

   text = t1 +" "+ t2;

   kount++;   }

   cout<<"Deobfuscated sentence: "<<text;

   return 0; }

Explanation:

This declares the text and the deobfuscation details as string

   string text,lengt;

This prompts for the sentence

   cout<<"Please enter obfuscated sentence: ";     cin>>text;

This prompts for the details

   cout<<"Please enter deobfuscation details: ";     cin>>lengt;

t1 and t2 are declared as string. They are used to split the texts into 2 parts

   string t1, t2;

This declares and initializes a count variable to 0  

   int kount = 0;

This iterates through the deobfuscation details

for(int i = 0;i<lengt.length();i++){

This gets each deobfuscation character

   kount+=(int)(lengt[i]-'0');

The next two instructions splits the text into 2

This gets from 0 to kount.

   t1 = text.substr(0, kount);

This gets from kount to the last index

   t2 = text.substr(kount, text.length()-1);

The new string or sentence is calculated here

   text = t1 +" "+ t2;

The kount variable is incremented by 1

   kount++;   } The loop ends here

This prints the new sentence

   cout<<"Deobfuscated sentence: "<<text;

<em>See attachment for program file</em>

Download cpp
7 0
3 years ago
Why do interest inventories compare your interests with the interests of others? A. to compare you with other people to see if y
Natasha2012 [34]

The answer is C: to match you with a career that someone with your same interests enjoys

People with similar interest have a high chance of having similar personalities. Interest inventories compare a person’s current interest with those of people in other occupations. This is done for the sole purpose of determining the preferred occupation for the individual. An example is a person taking the strong-Campbell interest inventory. He or she would receive a report comparing his or her interests to those already working in field like engineering, management, and accounting.  

6 0
3 years ago
ANIME IS LIFE<br> GET WRECKED LIGHT
murzikaleks [220]

Answer:

i love anime

Explanation:

8 0
3 years ago
Read 2 more answers
Which part of the faucet is the aerator?
sammy [17]
A faucet aerator<span> (or tap aerator) is often found at the tip of modern indoor water </span>faucets<span>.</span>
8 0
3 years ago
1-(50 points) The function sum_n_avgcomputes the sum and the average of three input arguments and relays its results through two
MAXImum [283]

Answer:

The program in C++ is as follows:

#include <iostream>

using namespace std;

double *sum_n_avg(double n1, double n2, double n3);

int main () {

   double n1, n2, n3;

   cout<<"Enter 3 inputs: ";

   cin>>n1>>n2>>n3;

   double *p;

   p = sum_n_avg(n1,n2,n3);

   cout<<"Sum: "<<*(p + 0) << endl;

   cout<<"Average: "<<*(p + 1) << endl;

  return 0;

}

double *sum_n_avg(double n1, double n2, double n3) {

  static double arr[2];

  arr[0] = n1 + n2 + n3;

  arr[1] = arr[0]/3;

  return arr;

}

Explanation:

This defines the function prototype

double *sum_n_avg(double n1, double n2, double n3);

The main begins here

int main () {

This declares variables for input

   double n1, n2, n3;

This prompts the user for 3 inputs

   cout<<"Enter 3 inputs: ";

This gets user inputs

   cin>>n1>>n2>>n3;

This declares a pointer to get the returned values from the function

   double *p;

This passes n1, n2 and n3 to the function and gets the sum and average, in return.

   p = sum_n_avg(n1,n2,n3);

Print sum and average

<em>    cout<<"Sum: "<<*(p + 0) << endl;</em>

<em>    cout<<"Average: "<<*(p + 1) << endl;</em>

  return 0;

}

The function begins here

double *sum_n_avg(double n1, double n2, double n3) {

Declare a static array

  static double arr[2];

Calculate sum

  arr[0] = n1 + n2 + n3;

Calculate average

  arr[1] = arr[0]/3;

Return the array to main

  return arr;

}

5 0
3 years ago
Other questions:
  • 3. with a dui charge on a driver’s record ______________. a. the price of his or her insurance greatly increases b. he or she ma
    13·1 answer
  • ____ is used specifically for the purpose of recording keystrokes, logging the programs or web sites accessed, or otherwise moni
    8·2 answers
  • printStars is a method that accepts a single int argument and returns no value. It prints as many stars as indicated by its argu
    9·1 answer
  • what is a paragraph on what i can write on what i learned from watching basic keyboard shortcuts using control functions video
    9·1 answer
  • Big data: options:
    8·1 answer
  • A manager would like information on the knowledge base searches conducted by customers and call center agents. Which two metrics
    10·1 answer
  • This function causes a program to terminate, regardless of which function or control mechanism is executing.
    12·1 answer
  • What is the small window that pops up in a application that requieres a response for the user
    12·2 answers
  • Is the address 7b invalid regarding cell references?
    8·1 answer
  • What is the difference between business strategies and business models?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!