<span> Hover the mouse over the power icon in the notifcation area</span>
The best assumption to make is that there is a hidden partition and the drive needs to be further searched.
You're setting the value of user_num to 20. Doing this won't allow the other test cases to run. Simply delete that line and your code should work. This is the code I wrote:
user_num = int(input())
while user_num>=1:
user_num/=2
print(user_num)
I wrote my code in python 3.8. I hope this helps.
Answer:
The solution code is as follows:
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main()
- {
- ifstream data;
- float number;
- float sum = 0;
-
- data.open("numbers.txt");
-
- while (data >> number) {
- sum = sum + number;
- }
- cout<<sum;
- return 0;
- }
Explanation:
Firstly, we create a ifstream object, <em>data</em> (Line 9). Then we can use the ifstream object to open the "numbers.txt" (Line 13) and use while loop to traverse through the number in the text file line by line (Line 15). White the loop is ongoing the number in each line is read by >> operator in a similar way to cin and then add each read number to sum variable (Line 16).
At last, display the output (Line 18).
Answer:
https://studio.code.org/projects/applab/YGZyNfVPTnCullQsVfijy6blqJPMBOgh5tQ5osNhq5c
Explanation: